Skip to content

Mwangi-ke/Akilah_AI

 
 

Repository files navigation

[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]


Logo

Akillah-AI

An AI chatbot built with RAG functionality
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

![Product Name Screen Shot][product-screenshot]

Akillah AI is a Retrival Augmented Generation Chatbot that extends OpenAI's text generation and conversational AI functionalities by allowing the models to access and leverage external knowledge bases

Retrieval-augmented generation (RAG) is an AI framework that combines the strengths of pre-trained language models and information retrieval systems to generate responses in a conversational AI system or to create content by leveraging external knowledge. It integrates the retrieval of relevant information from a knowledge source and the generation of responses based on that retrieved information.

Existing LLMs can reason about wide-ranging topics, but their knowledge is limited to the public data up to a specific point in time that they were trained on. This application augments the knowledge of the models with the specific information it needs so it can reason about private data or data introduced after a model's cutoff date.

(back to top)

The App

This application has 3 parts to it:

The chatbot

This is the main part of the application that incorporates the actual RAG chain, which takes the user query at run time and retrieves the relevant data from the index (data source), then passes that to the model. The retrieved documents or snippets or information is then provided to a large language model, which uses them as additional context for generating a more detailed, factual, and relevant response.

This functionality of the chatbot is exposed through REST API calls

The UI

This is the part of the application that consumes the REST API created from the Chatmodel in a User Interface

Discord AI Chatbot

This is the part of the application that exposes the RAG augmented chatbot created to users through a Discord chatbot. Users can query the model through Discord in addition to the UI

(back to top)

Built With

Chatbot UI Discord chatbot

(back to top)

Getting Started

Prerequisites

To get started with this project, you will need:

  1. OpenAI API keys
  2. Discord Token
  3. Pinecone API Key

Installation and Usage

Clone the repo git clone git@github.com:nyangoto/Akilah_AI.git

Chatbot

Create a .env file at the root of the project and define the environmet variables needed: PINECONE_API_KEY PINECONE_ENV OPENAI_API_KEY DOCKER_IMAGE PORT Create a virtual environment to run your application and activate it python3 -m venv <virtual-environment-name> souce <virtual-environment-name>/bin/activate Install the necessary requirements in the virtual environment pip install -r requirements.txt Run the chatbot app Using python: python3 chat.py Or using docker: sudo docker compose -p <docker-image-name> up --build You should get a confimation like the one below of the API endpoint of the chatbot. Refer to url/docs for documentation on the API Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

UI

(back to top)

Usage

(back to top)

Roadmap

(back to top)

Contributing

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 42.6%
  • Python 25.9%
  • JavaScript 16.0%
  • CSS 9.8%
  • Shell 3.8%
  • Dockerfile 1.9%