Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Search Engine using ChromaDB


Description

This project is a Semantic Search Engine built with Python, Sentence Transformers, and ChromaDB.

It extracts text from a PDF, creates overlapping text chunks, converts them into embeddings, stores them in ChromaDB, and allows users to search the document using natural language queries.


Features

  • Extract text from PDF files
  • Split text into overlapping chunks
  • Generate embeddings using Sentence Transformers
  • Store embeddings in ChromaDB
  • Semantic similarity search
  • Retrieve page numbers for search results
  • Persistent vector database

Technologies Used

  • Python
  • PyMuPDF (fitz)
  • Sentence Transformers
  • ChromaDB

Folder Structure

Semantic_Search_Engine/

├── data/ │ └── sample.txt │ ├── chroma_db/ │ ├── index_pdf.py ├── search.py ├── requirements.txt ├── README.md └── .gitignore


Installation

Clone the repository:

git clone <repository-url>

Move into the project directory:

cd Semantic_Search_Engine

Install dependencies:

pip install -r requirements.txt

PDF Setup

This repository does not include a PDF file.

  1. Place your PDF inside the data folder.
  2. Rename it to:
ai_ml.pdf

Example:

data/
    ai_ml.pdf

Usage

Step 1: Index the PDF

python index_pdf.py

Step 2: Search the document

python search.py

Example

Question:

What is Deep Learning?

Output:

Page: 12

Deep Learning is a subset of Machine Learning...

Future Improvements

  • Support multiple PDF files
  • Build a Streamlit web interface
  • Add hybrid search
  • Integrate with Large Language Models (RAG)

About

Semantic Search Engine using ChromaDB and Sentence Transformers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages