Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Search Engine using FAISS

Demo

Demo

A simple Semantic Search Engine built with Python, Sentence Transformers, and FAISS.

The application reads a PDF document, converts the text into embeddings, stores them in a FAISS vector index, and retrieves the most semantically relevant chunks for a user's query.


Features

  • Read PDF documents
  • Extract text page by page
  • Split text into sentences
  • Create overlapping text chunks
  • Generate embeddings using Sentence Transformers
  • Store embeddings in FAISS
  • Perform semantic similarity search
  • Display page number and chunk ID for retrieved results

Technologies Used

  • Python
  • PyMuPDF
  • Sentence Transformers
  • FAISS
  • NumPy
  • PyTorch

Project Structure

Semantic_Search_Engine/
│
├── app.py
├── requirements.txt
├── README.md
├── .gitignore
└── data/
    └── ai_ml.pdf

Installation

Clone the repository:

git clone (https://github.com/ridazahra-ai/semantic-search-engine)

Install dependencies:

pip install -r requirements.txt

Run the application:

python app.py

Example

Ask a question:

What is Machine Learning?

Top Results

Page: 5
Chunk ID: 12

Machine Learning is a subset of Artificial Intelligence...

What I Learned

While building this project, I learned:

  • PDF processing with PyMuPDF
  • Text chunking strategies
  • Sentence embeddings
  • Vector similarity search
  • FAISS indexing
  • Metadata management
  • Building a semantic search pipeline

Note

Place your own PDF inside the data/ folder.

Update the file path in app.py if necessary.

Author

Rida Zahra

AI Engineering Learning Journey

About

Semantic Search Engine built with Python, Sentence Transformers, and FAISS.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages