RAG Core documentation

RAG Core is a library designed to reduce the implementation of Retrieval-Augmented Generation applications to a configuration file and a few lines of code.

To get started, run

pip install ragcore

Once you have selected the components that suit your needs with the config file, creating a Retrieval-Augmented Generation system becomes as easy as this:

from ragcore import RAGCore

app = RAGCore() # pass config=<path-to-config.yaml> if not in root

# Upload a document "My_Book.pdf"
app.add(path="My_Book.pdf")

# Now you can ask questions
answer = app.query(query="What did the elk say?")

print(answer.content)

# List the document's title and content on which the answer is based
for doc in answer.documents:
   print(doc.title, " | ", doc.content)

# List all documents in the database
print(rag_instance.get_titles())

# You can delete by title
app.delete(title="My_Book")

Indices and tables