Custom GPT for document Q\&A
Top 67.9% on sourcepulse
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
npm i
1536
..env.local
with API keys and Pinecone details.npm run dev
http://localhost:3000
Highlighted Details
text-embedding-ada-002
for embeddings and GPT-3 for responses.Maintenance & Community
gpt4-pdf-chatbot-langchain
and gpt3.5-turbo-pgvector
.Licensing & Compatibility
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."
1 year ago
1 week