ai-template  by Jordan-Gilliam

Custom GPT for document Q\&A

created 2 years ago
450 stars

Top 67.9% 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

1 year ago

Responsiveness

1 week

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

Explore Similar Projects

Feedback? Help us improve.