ai-template  by Jordan-Gilliam

Custom GPT for document Q\&A

Created 2 years ago
451 stars

Top 66.8% on SourcePulse

GitHubView on GitHub
Project Summary

Mercury enables users to train custom GPT models on their own documents and websites, offering a Perplexity-style UI for interactive chat with cited sources. It supports a range of file types including PDFs, DOCX, TXT, and image files, with plans to add CSV and PPTX support.

How It Works

The system leverages OpenAI's embedding API (text-embedding-ada-002) to convert text from uploaded files or scraped webpages into vector embeddings. These embeddings are stored in a Pinecone vector database. When a user queries the system, their prompt is also embedded, and a similarity search is performed against the Pinecone index. The most relevant document chunks are retrieved and used to construct a prompt for GPT-3, which generates a streamed response with source citations.

Quick Start & Requirements

  • Install dependencies: npm i
  • Requires Pinecone account and API key, OpenAI API key.
  • Pinecone index must have dimensions 1536.
  • Configure .env.local with API keys and Pinecone details.
  • Start the app: npm run dev
  • View at http://localhost:3000
  • Official Docs: https://github.com/Jordan-Gilliam/ai-template

Highlighted Details

  • Utilizes Next.js API Routes with Edge runtime for streaming responses.
  • Integrates Tailwind CSS, Radix UI Primitives, and Lucide icons for a modern UI.
  • Employs OpenAI's text-embedding-ada-002 for embeddings and GPT-3 for responses.
  • Stores embeddings in Pinecone for efficient similarity search.

Maintenance & Community

  • Inspired by projects like gpt4-pdf-chatbot-langchain and gpt3.5-turbo-pgvector.
  • No explicit community links (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

  • The README does not specify a license.

Limitations & Caveats

The project is presented as a template, implying it may require further development for production use. Support for .csv and .pptx files is listed as "Coming Soon."

Health Check
Last Commit

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP AI at Vercel; Founder of Turborepo; Author of Formik, TSDX) and Andrew Kane Andrew Kane(Author of pgvector).

chatgpt-pgvector by gannonh

0%
938
Domain-specific chat completions app
Created 2 years ago
Updated 2 years ago
Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

LightRAG by HKUDS

1.2%
21k
RAG framework for fast, simple retrieval-augmented generation
Created 11 months ago
Updated 2 days ago
Feedback? Help us improve.