Skip to content

๐Ÿš€ Astro ChromaDB Search showcases the integration of Astro framework and ChromaDB, a vector database, to create a powerful semantic search system for markdown files.

Notifications You must be signed in to change notification settings

Cartman720/astro-chromadb-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Astro ChromaDB Search ๐Ÿš€

Astro ChromaDB Search is a showcase project that demonstrates the integration of ChromaDB, a vector database, with the Astro framework. The goal of this project is to create an efficient and cost-effective indexing system for embeddings, showcasing the power of combining these technologies.

Project Overview

The project aims to perform semantic search over markdown files using the Astro framework and ChromaDB. By storing documents as vectors in a high-dimensional space, it enables semantic searches to return documents with similar meanings to the input query. This setup utilizes OpenAI embeddings and supports various embeddings from Hugging Face.

Folder Structure

- src
  - components
    - search.ts
  - content
  - layout
    - main-layout.astro
  - pages
    - api/search.ts
    - posts/[...slug].astro
- index-builder.js

Prerequisites

Make sure you have the following prerequisites installed:

Running the Application

To run the application, follow these steps:

  1. Install dependencies: Run yarn to install the required dependencies.
  2. Install ChromaDB: Install ChromaDB by running pip install chromadb or via Docker Compose from the official ChromaDB repository.
  3. Start ChromaDB: Run yarn start:chroma to start ChromaDB by running chroma run --path ./chromadb (adjust the ./chromadb path to your desired location).
  4. Create embeddings: Run node src/index-builder.js to process MDX files in the content folder and create the necessary embeddings.
  5. Perform searches: Use the UI or the /api/search?query={phrase} endpoint to perform searches based on the provided query.

UI Showcase

Dec-27-2023 04-37-21

Code Quality

The project demonstrates good code quality and follows best practices. Contributions are always welcome! Feel free to fork the repository and submit pull requests with your improvements.

Additional Resources

Here are some additional resources for learning more about Astro and ChromaDB:

Author

๐Ÿ‘จโ€๐Ÿ’ป Created by Aren Hovsepyan

About

๐Ÿš€ Astro ChromaDB Search showcases the integration of Astro framework and ChromaDB, a vector database, to create a powerful semantic search system for markdown files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published