Skip to content

Latest commit

ย 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Semantic Search Engine โ€” Powered by Qdrant

Python Qdrant Docker Poetry License

A full-stack semantic search engine built with Qdrant vector database โ€” find startups by meaning, not just keywords.

Live Demo ยท Report Bug ยท Request Feature


๐Ÿ“Œ Table of Contents


๐Ÿ“– About the Project

Qdrant Demo is a semantic search engine that goes beyond keyword matching โ€” it understands the meaning behind your query and returns the most contextually relevant startup results.

Built on top of Qdrant, a high-performance vector similarity search engine, this project demonstrates how to embed natural language queries, store vector representations, and retrieve semantically similar documents at scale โ€” all running locally via Docker.

๐Ÿ’ก Semantic search finds results based on intent and context, not just exact word matches. Ask "AI-powered productivity tools" and it surfaces relevant startups even if they never use those exact words.


โœจ Features

  • ๐Ÿง  Semantic vector search โ€” queries matched by meaning using dense embeddings
  • ๐Ÿš€ Qdrant vector database โ€” fast approximate nearest neighbor (ANN) search at scale
  • ๐Ÿณ Fully Dockerized โ€” spin up the entire stack with a single command
  • ๐Ÿ“ฆ Poetry dependency management โ€” reproducible, conflict-free environments
  • ๐Ÿ—‚๏ธ Two dataset options โ€” lightweight startup JSON or full Crunchbase organizations dataset
  • ๐ŸŒ Web frontend โ€” clean search UI accessible at localhost:8000
  • โšก Real-time results โ€” sub-second query response for startup discovery

๐Ÿ›  Tech Stack

Layer Technology
Vector Database Qdrant
Backend Python 3.11
Dependency Mgmt Poetry
Containerization Docker, Docker Compose
Embeddings Sentence Transformers / OpenAI
Dataset Startups JSON / Crunchbase CSV
Frontend HTML, CSS, JavaScript

๐Ÿ— System Architecture & Data Flow

Semantic Search Engine using Qdrant

Raw Data (JSON / CSV)
        โ”‚
        โ–ผ
  Text Preprocessing
        โ”‚
        โ–ผ
  Embedding Model โ†’ Dense Vectors
        โ”‚
        โ–ผ
  Qdrant Collection (Vector Index)
        โ”‚
        โ–ผ
  User Query โ†’ Embed Query Vector
        โ”‚
        โ–ผ
  ANN Search (Cosine Similarity)
        โ”‚
        โ–ผ
  Top-K Relevant Startups Returned
        โ”‚
        โ–ผ
  Results Rendered in Web UI

๐Ÿ–ผ Screenshots

Frontend โ€” Starting Page

Frontend starting page

Results After Search

Search results


๐Ÿš€ Getting Started

Prerequisites

Ensure the following are installed before proceeding:

Tool Version Link
Python 3.11 Download
Docker & Docker Compose Latest Download
pip Latest Bundled with Python
wget Any Install guide

Installation & Setup

Follow these steps in order:

Step 1 โ€” Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate          # macOS/Linux
.venv\Scripts\activate             # Windows

Step 2 โ€” Install dependencies with Poetry:

pip install poetry
poetry install

Step 3 โ€” Download the startup dataset:

wget https://storage.googleapis.com/generall-shared-data/startups_demo.json -P data/

Step 4 โ€” Start the Qdrant service via Docker:

docker-compose -f docker-compose-local.yaml up

โณ Wait for the Qdrant service to fully start before proceeding to the next step.

Step 5 โ€” Index the data into Qdrant:

python -m qdrant_demo.init_collection_startups

Step 6 โ€” Open the application:

http://localhost:8000/

You're ready to search! ๐ŸŽ‰


๐Ÿ“Š Using a Larger Dataset with Crunchbase

For a richer search experience, you can index the full Crunchbase organizations dataset.

โš ๏ธ Requires a free Crunchbase account and API key. Register at crunchbase.com.

Step 1 โ€” Download the Crunchbase data:

wget 'https://api.crunchbase.com/odm/v4/odm.tar.gz?user_key=<YOUR-CRUNCHBASE-API-KEY>' -O odm.tar.gz

Step 2 โ€” Extract and move the organizations file:

tar -xvf odm.tar.gz
mv odm/organizations.csv ./data

Step 3 โ€” Index the Crunchbase data into Qdrant:

python -m qdrant_demo.init_collection_crunchbase

The Crunchbase dataset contains significantly more companies and produces richer, more diverse search results.


๐Ÿ“ Project Structure

qdrant_demo/
โ”‚
โ”œโ”€โ”€ docker-compose-local.yaml        # Docker Compose config for local Qdrant instance
โ”œโ”€โ”€ pyproject.toml                   # Poetry project config & dependencies
โ”œโ”€โ”€ poetry.lock                      # Locked dependency versions
โ”‚
โ”œโ”€โ”€ qdrant_demo/                     # Main application package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ init_collection_startups.py  # Index startup JSON dataset into Qdrant
โ”‚   โ”œโ”€โ”€ init_collection_crunchbase.py# Index Crunchbase CSV into Qdrant
โ”‚   โ”œโ”€โ”€ search.py                    # Semantic search logic & query embedding
โ”‚   โ””โ”€โ”€ app.py                       # Web server & API routes
โ”‚
โ”œโ”€โ”€ data/                            # Dataset directory
โ”‚   โ”œโ”€โ”€ startups_demo.json           # Default startup dataset
โ”‚   โ””โ”€โ”€ organizations.csv            # (Optional) Crunchbase dataset
โ”‚
โ”œโ”€โ”€ static/                          # Frontend static assets
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ””โ”€โ”€ js/
โ”‚
โ”œโ”€โ”€ templates/                       # HTML templates
โ”‚   โ””โ”€โ”€ index.html
โ”‚
โ””โ”€โ”€ README.md

๐Ÿง  How Semantic Search Works

Traditional keyword search looks for exact word matches. Semantic search works differently:

Step What Happens
1. Embed documents Each startup description is converted into a dense vector (e.g., 384 or 1536 dimensions) using a sentence embedding model
2. Store in Qdrant Vectors are indexed in a Qdrant collection optimized for ANN (Approximate Nearest Neighbor) search
3. Embed the query Your search query is converted into a vector using the same embedding model
4. Similarity search Qdrant finds the top-K vectors closest to your query vector using cosine similarity
5. Return results The matching startup records are returned and displayed in the UI

This means queries like "sustainable energy solutions" will surface relevant startups even if their descriptions use words like "clean tech" or "renewable power" instead.


๐Ÿ”ฎ Future Improvements

  • Add filters โ€” search by industry, country, founding year
  • Hybrid search โ€” combine semantic + keyword (BM25) ranking
  • Pagination and infinite scroll for large result sets
  • REST API with OpenAPI/Swagger documentation
  • Dockerize the full application (frontend + backend + Qdrant)
  • Support for custom embedding models (OpenAI, Cohere, local models)
  • Authentication for multi-user deployments

๐Ÿค Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m "Add: your feature description"
  4. Push to your branch: git push origin feature/your-feature
  5. Open a Pull Request

Please follow PEP 8 style guidelines and add comments for any non-obvious logic.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


๐Ÿ“ฌ Contact

Your Name โ€” ganesh1a0576@gmail.com

GitHub: Ganesh-a0576

Project Link: https://github.com/your-username/qdrant-demo


โญ Found this useful? Give it a star โ€” it helps others discover the project!


Built with โค๏ธ using Qdrant & Python

About

This project demonstrates how to build a semantic search system using Qdrant vector database. Startup descriptions are converted into embeddings and stored as vectors, while structured metadata is stored as payload.A curated demo dataset is used to clearly showcase vector search behavior and payload-based filtering.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages