llm-answer-engine  by developersdigest

LLM answer engine for Perplexity-style search

Created 1 year ago
4,922 stars

Top 10.2% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Perplexity-inspired answer engine, targeting developers interested in NLP and search. It enables users to build a sophisticated application that returns answers, sources, images, videos, and follow-up questions based on user queries, leveraging a combination of LLMs and search APIs.

How It Works

The engine integrates multiple LLMs (Groq, Mistral, OpenAI) and search services (Brave, Serper) within a Next.js framework. It utilizes Langchain.js for text processing and OpenAI embeddings for semantic search. User queries are processed to retrieve relevant information from search engines, which is then fed to an LLM for answer generation. The architecture supports streaming responses and optional features like rate limiting and semantic caching via Upstash Redis.

Quick Start & Requirements

  • Install: git clone https://github.com/developersdigest/llm-answer-engine.git followed by npm install or bun install (non-Docker) or docker compose up -d (Docker).
  • Prerequisites: Node.js, npm/bun, Docker (optional). API keys required from OpenAI, Groq, Brave Search, and Serper.
  • Configuration: API keys and model parameters are set in .env and app/config.tsx.
  • Docs: YouTube Tutorials, Express API, Upstash Rate Limiting

Highlighted Details

  • Integrates with Groq, Mistral AI's Mixtral, Langchain.JS, Brave Search, Serper API, and OpenAI.
  • Supports streaming text responses and optional function calling for Maps, Shopping, and Stock Data.
  • Offers optional integration with Ollama for local inference and embeddings, and Upstash Redis for rate limiting and semantic caching.
  • Includes a backend-only Express.js API version.

Maintenance & Community

  • Project maintained by developersdigest.
  • Contributions are welcome via pull requests and issues.
  • Support channels include GitHub issues.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Permissive license suitable for commercial use and closed-source linking.

Limitations & Caveats

Ollama support for follow-up questions is not yet implemented, and using local Ollama models for inference and embeddings can result in long time-to-first-token. Function calling is currently in beta.

Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
10 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Simon Willison Simon Willison(Coauthor of Django).

semantra by freedmand

0.1%
3k
CLI tool for semantic document search
Created 2 years ago
Updated 1 year ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Taranjeet Singh Taranjeet Singh(Cofounder of Mem0), and
8 more.

Perplexica by ItzCrazyKns

5.7%
25k
AI-powered search engine alternative
Created 1 year ago
Updated 1 day ago
Feedback? Help us improve.