An AI-powered platform that analyzes news from multiple sources and extracts factual consensus and narrative differences.
Drishtikon helps users understand:
- What is commonly agreed upon (truth signals)
- Where narratives differ (bias / interpretation)
NOTE: This is a hackathon project and prototype, not a production application.
- Backend: FastAPI (Python)
- LLM: Groq (llama-3.3-70b-versatile) - Fast & Free
- Vector Database: Pinecone
- Embeddings: Pinecone Inference API (nvidia/llama-3.2-nv-embedqa-1b-v2) - 4096 dimensions, Pinecone-hosted
- Frontend: React + Tailwind CSS (upcoming)
- News Sources: NewsAPI / GNews
- Python 3.14+
- Virtual environment
- Create and activate virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
Edit
.envfile with your API keys:
# Get Groq API key from: https://console.groq.com/
GROQ_API_KEY=your_groq_api_key_here
# Get NewsAPI key from: https://newsapi.org/
NEWS_API_KEY=your_news_api_key_here
# Get Pinecone details from: https://app.pinecone.io/
# Note: Pinecone hosts the embedding model, no separate NVIDIA key needed!
PINECONE_API_KEY=your_pinecone_api_key_here
PINECONE_INDEX_NAME=drishtikon-claims
PINECONE_HOST=your_index_host_here
# Model Configuration
GROQ_MODEL=llama-3.3-70b-versatile
PINECONE_EMBED_MODEL=nvidia/llama-3.2-nv-embedqa-1b-v2
EMBEDDING_DIMENSION=4096How to get Pinecone Host:
-
Go to https://app.pinecone.io/
-
Click on your index "drishtikon-claims"
-
Copy the Host URL (looks like:
drishtikon-claims-xxxxx.svc.xxx.pinecone.io) -
Run the backend:
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload- Test the API:
curl http://localhost:8000/
curl -X POST http://localhost:8000/api/analyze \
-H "Content-Type: application/json" \
-d '{"topic": "AI regulation"}'news-consensus-analyzer/
├── app/
│ ├── main.py # FastAPI application entry point
│ ├── routes/
│ │ └── analyze.py # API routes
│ ├── services/
│ │ ├── news_service.py # News aggregation
│ │ ├── llm_service.py # LLM claim extraction
│ │ ├── embedding_service.py # OpenAI embeddings
│ │ ├── pinecone_service.py # Vector database operations
│ │ ├── clustering_service.py # Claim clustering
│ │ ├── consensus_service.py # Consensus analysis
│ │ └── bias_service.py # Bias classification
│ ├── models/
│ │ └── schemas.py # Pydantic models
│ └── utils/
├── .env # Environment variables
├── requirements.txt # Python dependencies
└── README.md # This file
Health check endpoint
{
"message": "Welcome to Drishtikon API",
"status": "running",
"version": "1.0.0"
}Health check endpoint
{
"status": "healthy"
}Analyze news consensus on a topic
Request Body:
{
"topic": "AI regulation"
}Response:
{
"status": "processing",
"message": "Analyzing topic: AI regulation",
"data": {
"topic": "AI regulation"
}
}The project follows a modular architecture with clear separation of concerns:
- Routes: Handle HTTP requests/responses
- Services: Contain business logic
- Models: Define data schemas
- Utils: Utility functions
See project details/ folder for step-by-step implementation guide:
- ✅ Step 1: Project Setup (Backend) - COMPLETED
- Step 2: News Aggregation
- Step 3: Claim Extraction
- Step 4: Embedding Generation
- Step 5: Vector Database Storage
- Step 6: Clustering Logic
- Step 7: Consensus Analysis
- Step 8: Frontend Setup
- Step 9: Integration
- Step 10: Deployment
MIT License - Hackathon Project