llm-answer-engine  by developersdigest

LLM answer engine for Perplexity-style search

created 1 year ago
4,912 stars

Top 10.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
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

1 month ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Alex Cheema Alex Cheema(Cofounder of EXO Labs), and
3 more.

Perplexica by ItzCrazyKns

0.3%
23k
AI-powered search engine alternative
created 1 year ago
updated 1 day ago
Feedback? Help us improve.