Mainbot: Headless RAG

Mainbot: Headless RAG

Turn-key RAG Chat Bot for developers

Mainbot, a headless Retrieval Augmented Generation (RAG) chat bot is just getting its wheels turning. It's a straightforward, powerful tool designed for those who need specific, domain-focused answers without the fluff.

GitHub - savantly-net/mainbot: A chat bot for domain specific knowledge
A chat bot for domain specific knowledge. Contribute to savantly-net/mainbot development by creating an account on GitHub.

What's Mainbot All About?

Mainbot is still in its early stages, but it's shaping up to be a robust, turn-key solution for RAG needs. Think of it as your go-to backend guy for getting domain-specific info. It's built with OpenAI and Pinecone for now, but it's flexible enough to integrate other tech down the line.

It leverages LangChain4J as an abstraction over LLMs and Storage.  

GitHub - langchain4j/langchain4j: Java version of LangChain
Java version of LangChain. Contribute to langchain4j/langchain4j development by creating an account on GitHub.

Core Features

  • Multi-Tenant Ready Vector Storage: Mainbot uses namespaced storage, meaning you can handle multiple clients or projects without data getting mixed up.
  • OAuth: Secure sign-in? Check. JWT headers keep things locked down. No SSO tax here.
  • Isolated User Sessions: Each user gets their own sandbox, ensuring interactions are personal and continuous, without overlap.
  • Easy Doc Addition: Add documents via REST to Mainbot’s storage with a simple embedding pipeline.
  • RAG as Default: The main gig here is combining document retrieval with generative AI, giving you precise, context-aware responses.

Setting It Up

Here's how to get Mainbot up and running:

  1. Grab the example.env file and rename it to .env.
  2. Fill in the blanks for OpenAI and Pinecone.
  3. Fire up the terminal and punch in make dev.
  4. Check out the Swagger UI at http://localhost:8080/swagger-ui/index.html to see Mainbot in action.


Create a session

Send a message

What’s Next?

Right now, Mainbot’s foundations are set, but there’s room to grow. We’re talking about making it even more adaptable by loading jars at runtime to extend the functionality without forking the source. Or creating a Spring Boot Starter package, making it a breeze to integrate into any Java Spring Boot app.

Bottom Line

Mainbot is still a work in progress, but it’s already shaping up to be a solid, no-frills solution for anyone needing a RAG chat bot. It's about giving you the info you need with minimal fuss. Keep an eye on this project – it’s just getting started.