Skip to main content

RecallAI is a cutting-edge Retrieval-Augmented Generation (RAG) framework designed for Large Language Models (LLMs). It enhances LLM responses by integrating real-time knowledge retrieval from structured and unstructured data sources.

Project description

RecallAI

Overview

RecallAI is a powerful Retrieval-Augmented Generation (RAG) framework designed to enhance the capabilities of Large Language Models (LLMs). It integrates real-time knowledge retrieval from structured and unstructured data sources, enabling more informed and accurate responses.

Features

  • Retrieval-Augmented Generation (RAG): Enhances LLM responses with real-time information retrieval.
  • Integration with OpenAI Models: Supports GPT-based models for improved text generation.
  • Qdrant Vector Store: Efficient vector storage and retrieval for document embeddings.
  • Document & Web Ingestion: Supports ingesting PDFs and web pages for knowledge retrieval.

Installation

Prerequisites

  • Python 3.10+
  • pip package manager
  • Qdrant or Pinecone vector database
  • OpenAI API Key

Install via PyPI

You can install RecallAI directly from PyPI:

pip install recall-ai

Manual Installation

  1. Clone the repository:
    git clone https://github.com/AshishChandpa/RecallAI.git
    cd RecallAI
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Set up environment variables:
    • Create a .env file in the project root.
    • Add your OpenAI API key:
      OPENAI_API_KEY=your_openai_api_key
      
  4. Ensure Qdrant is running:
    docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
    

Usage

Running the Example Script

Execute the script to see the RAG system in action:

python examples/example.py

Using RecallAI in Your Project

Import and use RecallAI in your Python scripts:

from recallai import RAGSystem, QdrantVectorStore, PromptManager

# Configure Qdrant connection
qdrant_store = QdrantVectorStore(
    url="http://localhost:6333",
    collection_name="my_rag_collection",
    vector_size=1536,  # adjust to your embedding dimension
)

# Initialize the RAG system
rag_system = RAGSystem(
    vector_store=qdrant_store,
    vector_namespace="<NameSpaceName>",
    openai_api_key=os.getenv("OPENAI_API_KEY"),
)

# Retrieve documents and generate responses
user_query = "Explain the main concepts from the documents."
context = rag_system.retrieve_documents(user_query, "pdf")

instructions = "You are an expert assistant tasked with answering questions using the provided context."
prompt_manager = PromptManager(instructions=instructions)
full_prompt = prompt_manager.create_prompt(context, user_query)

answer = rag_system.chat(full_prompt, "gpt-4o-mini")
print("Answer:", answer)

Configuration

  • Adjust the QdrantVectorStore parameters for different vector dimensions or collection names.
  • Modify the ingestion pipeline to include additional document sources.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Contact

For questions or suggestions, reach out via email.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recallaish-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recallaish-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file recallaish-0.1.0.tar.gz.

File metadata

  • Download URL: recallaish-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for recallaish-0.1.0.tar.gz
Algorithm Hash digest
SHA256 479ef885215a3fb443ab4ad9df968f84b488857300e60b3d2b1766b48c4dd5de
MD5 3b6fdcfb61230ba1c0c9c55bd2e60a31
BLAKE2b-256 f85e56105f7f9088447ccc9c1228d90b8a104f6dd8d01adfaa74a0b18ccdc487

See more details on using hashes here.

File details

Details for the file recallaish-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: recallaish-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for recallaish-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9aa8148cec0aae93f5168beb86bf0cb98e42f3ba6592506e3c90d0faffd482b
MD5 6765f6c635b976617e4994cc1b00fbd2
BLAKE2b-256 73e4e1fce0a2db2f8f017bf49ce8b1fca80bee27553fd598d7ab66f1b8401036

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page