PrivateGPT

PrivateGPT re-invented

Going from proof of concept to production-ready service to create Private Contextual GenAI apps

BY Zylon - 
October 2023

PrivateGPT is a production-ready service offering Contextual Generative AI primitives like document ingestion and contextual completions through a new API that extends OpenAI’s standard. Talk to your documents privately using the default UI and RAG pipeline or integrate your own.

Leveraging the learnings

After 39K+ GitHub stars since we launched on May 2023, all the contributions (5K+ forks) and feedback provided by the open source community, we have re-designed the project from scratch, focusing on value added and software quality.

And for those that were requesting a plug-and-play way to talk to their documents, we have made things easier with the new PrivateGPT UI: now you can upload documents, select the interaction mode with your LLM (query, chat or chunks) and talk to it through a prompt.

PrivateGPT UI and API

New features

We have extended OpenAI’s API to add support to document-based contextualized completions, abstracting the complexity of RAG pipelines. It is as easy as including use_context attribute to your request.

Chat completions API example

We now provide a Context Chunks API that:

  • Given a text, returns the most related chunks from the ingested documents.
  • Includes previous and next chunks for extended context retrieval.
  • Uses only the embeddings model, so it is hyper fast!
Contextual chunks API example

The Ingest API returns the doc_id and the extracted doc_metadata, which by the way works great with LlamaIndex's Metadata Extractors!

A a couple of cool use cases that illustrate why this is incredibly useful for developers:

1. The doc_id can be utilized to filter the context used by Completions API. This enables:

  • Chatting with just one of the ingested documents at a time; sometimes users know what they want.
  • Chatting with collections of documents (as a simple version of Quivr's brains).

2. The doc_metadata can be stored and used in deterministic (non LLM-based) business logic of your app:

  • Basic doc search.
  • Doc filtering
  • Doc clustering
  • Aggregated analytics
  • And more…
Ingest API example

Next Steps

PrivateGPT is a project created by and designed for developers for the sake of unlocking GenAI capabilities in a 100% private way. However, during these months we have been talking to some of you (thanks for reaching out!) and we have realized that this is not enough for companies and organizations lacking tech expertise.

That’s the reason why we want to go beyond and explore what we can build on top of PrivateGPT to create a complete B2B product working backwards for industry necessities. By doing so, we will acquire new learnings to incorporate to PrivateGPT, creating a perfect flywheel scenario.

Stay with us for the journey to come, join the community in our Discord channel and keep providing your invaluable feedback to make PrivateGPT a great tool for the community!

Daniel Gallego Vico, Co-founder & CPTO

PrivateGPT
BY Zylon - 
October 2023

Get Started Today

Join the Beta