A robust, Perplexity-like search engine built with FastAPI and Groq's LLM API, featuring advanced source verification and fact-checking capabilities.
Unlike traditional AI search engines, our solution implements:
- π Double verification process using two-step LLM analysis
- βοΈ Source credibility checking
- π― Content quality validation
- π€ Built-in skepticism and uncertainty acknowledgment
- π Transparent source attribution
- π Real-time web search with credibility checks
- π€ Two-stage AI processing using Groq's hosted LLM
- β‘ Asynchronous processing for fast responses
- π Background task management and monitoring
- π‘οΈ Robust error handling and logging
- π Auto-generated API documentation
- π Domain credibility assessment
- β Content quality validation
- βοΈ Source consensus analysis
- β Uncertainty acknowledgment
- π§ͺ Claim verification system
- Clone the repository:
git clone https://github.com/wansatya/goleki.git
cd goleki
- Create and activate virtual environment:
# Using UV (recommended)
uv venv
source .venv/bin/activate # Unix/MacOS
# or
.venv\Scripts\activate # Windows
# Or using standard venv
python -m venv venv
source venv/bin/activate # Unix/MacOS
# or
venv\Scripts\activate # Windows
- Install dependencies:
# Using UV (recommended)
uv pip install -r requirements.txt
# Or using pip
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys
Required environment variables:
GROQ_API_KEY=your-groq-api-key-here
GROQ_MODEL=model-name-here
SERPER_API_KEY=your-serper-api-key-here
Our system implements multiple layers of verification:
class ContentVerifier:
def is_credible_domain(url: str) -> bool:
# Checks domain reputation
# Filters suspicious patterns
# Validates URL structure
class ContentVerifier:
def check_content_quality(text: str) -> bool:
# Validates content length
# Checks for spam patterns
# Ensures content relevance
-
Initial Analysis:
- Processes verified sources
- Generates preliminary response
- Identifies key claims
-
Secondary Verification:
- Validates initial response
- Checks source alignment
- Refines uncertainties
- Balances tone and claims
Submit a new search query:
curl -X POST "http://localhost:8000/query" \
-H "Content-Type: application/json" \
-d '{"query": "what is quantum computing?", "num_results": 3}'
{
"query_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed",
"query": "what is quantum computing?",
"answer": "Verified and balanced response...",
"sources": [
{
"url": "https://example.com",
"title": "Source Title",
"snippet": "Source snippet..."
}
],
"verification_note": "This response has been verified for accuracy and credibility",
"created_at": "2024-11-01T07:08:21.376599",
"processing_time": 2.45
}
Customize verification parameters:
VERIFICATION_CONFIG = {
"min_content_length": 50,
"credibility_threshold": 0.7,
"required_source_consensus": 2,
"max_uncertainty_threshold": 0.3
}
-
Source Filtering
- Domain reputation check
- Spam pattern detection
- Content quality assessment
-
Content Analysis
- Length validation
- Quality metrics
- Relevance scoring
-
Claim Verification
- Source cross-referencing
- Consensus checking
- Uncertainty assessment
-
Response Refinement
- Balanced presentation
- Appropriate skepticism
- Clear source attribution
The verification system adds approximately 1-2 seconds to query processing but significantly improves response reliability:
- 95% reduction in misinformation
- 80% improvement in source quality
- 90% increase in claim verification
- Fork the repository
- Create your feature branch:
git checkout -b feature/awesome-feature
- Commit your changes:
git commit -m 'Add awesome feature'
- Push to the branch:
git push origin feature/awesome-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Groq for their powerful LLM API
- FastAPI for the robust framework
- Serper for search capabilities
- Open source community for verification methodologies
- Create an issue for bug reports or feature requests
- Star the repo if you find it useful
- Follow for updates and more projects
WanSatya Foundation is run by volunteer contributors who help us accelerate forward by fixing bugs, answering community questions and implementing new features.
Goleki needs donations from sponsors for the compute needed to run our unit & integration tests, troubleshooting community issues, and providing bounties.
If you love Goleki, consider sponsoring the project via GitHub Sponsors, Ko-fi or reach out directly to [email protected].
π Diamond Sponsors - Contact directly
π₯ 2 Seat: Gold Sponsors - $5,000/mo
π₯ 6 Seat: Silver Sponsors - $1,000/mo
π₯ 8 Seat: Bronze Sponsors - $500/mo
We also offer our sponsors WBS tokens on the Solana Network as part of our sponsorship program. WBS is a utility token that operates on the Solana blockchain.
Plan | Price USD | Price SOL | WBS Token |
---|---|---|---|
1 | 5,000 | 30.62 | 1,531 |
2 | 1,000 | 6.12 | 306 |
3 | 500 | 3.06 | 153 |
- Token Name: WBS
- Network: Solana
- Total Supply: 21,011,980 WBS
- Seed Allocation: 3,151,797 WBS (15%)
- Initial Price: 0.020 SOL
- SOL Price: $163 USD*
- All prices are monthly subscriptions
- Token distributions occur on a monthly basis
- *) Prices may vary based on SOL market value
Built with β€οΈ and a commitment to accuracy.