Minimal LLM service implementation, like Perplexity AI
Top 86.5% on sourcepulse
This project provides a minimalist, open-source implementation of Perplexity.ai's core functionality, enabling users to query information and receive answers sourced from Google searches. It is designed for developers and researchers seeking a straightforward, code-centric approach to LLM-powered information retrieval without complex interfaces or agent systems.
How It Works
The system takes a user query, determines if a Google search is necessary, and reformulates the query for optimal search results. It then fetches relevant webpage content, constructs a prompt combining a system prompt, fetched context, and the user query, and sends it to an LLM API for streamed completion. The output is saved to a markdown file for visualization.
Quick Start & Requirements
pip install googlesearch-python requests beautifulsoup4 lxml backoff openai
OPENAI_API_KEY
environment variable).python nanoPerplexityAI.py
Highlighted Details
playground.md
in VS Code.Maintenance & Community
The project acknowledges inspirations from perplexity.ai, clarity-ai, and Perplexica. No specific community channels or active maintenance signals are detailed in the README.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The implementation does not reformat search results, meaning not all results are utilized, prioritizing speed and streaming. It lacks a GUI and LLM agents, focusing solely on the core retrieval and generation loop.
6 months ago
Inactive