RAG Core
A Retrieval-Augmented Generation library with a CLI interface. Build RAG applications with just a few commands and a configuration file.
Supported setups
| Databases | LLMs | Embeddings | Document types |
|---|---|---|---|
| Chroma (local) | OpenAI | OpenAI | |
| Pinecone (remote) | AzureOpenAI | AzureOpenAI |
For more details see the documentation.
Installation
To install, run
pip install ragcore
or clone and build from source
git clone https://github.com/daved01/ragcore.git
cd ragcore
pip install .
If everything worked, running
ragcore -h
should show you some information about ragcore.
A Simple Example
To build an application with OpenAI or AzureOpenAI LLMs and embeddings, and a local database, first set your OpenAI API key as described here:
export OPENAI_API_KEY=[your token]
Then, create a config file config.yaml like this in the root of your project:
database:
provider: "chroma"
number_search_results: 5
base_dir: "data/database"
splitter:
chunk_overlap: 256
chunk_size: 1024
embedding:
provider: "openai"
model: "text-embedding-model"
llm:
provider: "openai"
model: "gpt-model"
And finally, create your application using this config file:
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 response is based
for doc in answer.documents:
print(doc.title, " | ", doc.content)
# List all documents in the database
print(app.get_titles())
# You can delete by title
app.delete(title="My_Book")
And that's it! For more information, as well as an overview of supported integrations check out the documentation.
Metadata
Release files for ragcore 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ragcore-1.0.4.tar.gz | 24.7 kB | Without provenance | Details for ragcore-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ragcore-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for ragcore-1.0.4-py3-none-any.whl |
Total release size: 55.4 kB
Release files / ragcore-1.0.4.tar.gz
| Download URL | ragcore-1.0.4.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f94f4964b8ef87f268a786b085d51475d6b69edb3a2483a53894518d521549ad
|
|
BLAKE2b-256 checksum How to use checksums |
949c6af2350ee3b98f5ba4043285aed2305b4e3992d0814858ed0adbe533bfbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / ragcore-1.0.4-py3-none-any.whl
| Download URL | ragcore-1.0.4-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ebbe0107f532cb2a4e354ea87bede024a46b4a431f93ab716e0bbd51745a24b
|
|
BLAKE2b-256 checksum How to use checksums |
9aee63b53c76d7b47d2bfe66f70cadeaff068bdb302c86645bbf3fdf9f3d2c09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Security for ragcore 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.