How a-dinesh-kumar/semantic-similarity-search-system works
This is a FastAPI semantic-search application with a browser interface. Users enter a query, choose an embedding model and optional category, and receive ranked knowledge-base documents with similarity scores and token-status details; a compare view runs the query across all models. The API loads the knowledge base and embedding models, while search code vectorizes documents and queries, preprocesses query text, filters categories, and ranks by cosine similarity. The tree does not include the processed CSV or model artifacts referenced by the server. The upload UI endpoint is not implemented in the shown API excerpt.
Main entry points: main.py HTTP API · app.js Search interface · search.py Semantic search · data_loader.py Knowledge-base loader
Components 7
Browser interface
- Search interface
static/js/app.js
API service
- HTTP API
app/main.py - Embedding models
app/main.py - Knowledge-base loader
app/data_loader.py
Search and language
- Semantic search
app/search.py - Query preprocessing
app/preprocessing.py
Other components
- Search user
Connections 5
- Search user → Search interface: enters query
static/js/app.js - Search interface → HTTP API: requests stats and search
static/js/app.js - HTTP API → Knowledge-base loader: loads knowledge base
app/main.py - HTTP API → Semantic search: vectors and ranks
app/main.py - Semantic search → Query preprocessing: preprocesses query
app/search.py