This project builds a semantic search engine for Medium articles using Pinecone as the vector database, Sentence Transformers for embedding generation, and Apache Airflow for orchestration. Each step in the pipeline runs as an Airflow task and is fully containerized with Docker.
✅ Completed as part of an academic assignment focused on building vector-based semantic search engines using modern MLOps tooling.
- Download Medium article dataset
- Clean, preprocess, and format metadata
- Generate sentence embeddings using
all-MiniLM-L6-v2 - Create/reset a Pinecone index
- Batch upsert embeddings to Pinecone vector DB
- Perform semantic search for a given query
- Run all tasks inside Apache Airflow DAG
- Fully configured via
docker-compose.yaml
- 🧬 Sentence Transformers
- 📦 Pinecone
- 📊 Apache Airflow
- 🐳 Docker &
docker-compose - 🐍 Python 3.10+
git clone https://github.com/Nak1106/semantic-search-pipeline.git
cd semantic-search-pipelinedocker compose down
docker compose up -dEnsure sentence-transformers and pinecone-client are included in the docker-compose.yaml.
Create an Airflow Variable in the UI:
- Variable Key:
pinecone_api_key - Variable Value: Your actual API key from Pinecone.io
graph TD
A[Download Data] --> B[Preprocess Data]
B --> C[Create Pinecone Index]
C --> D[Generate Embeddings & Upsert]
D --> E[Test Search Query]
Each task logs its results in Airflow, including embedding output and vector search scores.
Search results for query: 'what is ethics in AI'
ID: 84, Score: 0.912, Title: Ethics in Machine Learning...
ID: 37, Score: 0.876, Title: Understanding AI and Morality...
...
| Step | Screenshot |
|---|---|
| DAG Overview | ✅ Captured in Airflow UI |
| Task Logs | ✅ Each task log included |
| Docker Compose Setup | ✅ Verified setup with sentence-transformers & Pinecone |
Place screenshots in a folder named /screenshots.
- Build an Airflow DAG with multiple NLP + MLOps tasks
- Generate semantic embeddings using state-of-the-art models
- Interact with a scalable vector DB (Pinecone)
- Run real-time search against preprocessed article metadata
- Dockerize your full Airflow pipeline for reproducibility
Nakshatra Desai
Graduate Student – MS Data Analytics @ SJSU
📫 LinkedIn