Skip to main content

A modular Python package for implementing Retrieval Augmented Generation chains for the chATLAS project.

Reason this release was yanked:

accidental uploaded unfinished version. Because of bug in gitlab CI/CD that is now fixed

Project description

chATLAS_Chains

This package implements and benchmarks various Retrieval Augmented Generation (RAG) chains for use in the chATLAS project.

Installation

From PyPI

pip install chATLAS-Chains

From source

We recommend using uv

cd chATLAS_Chains
uv sync

Environment variables

These are required for the following use cases

  1. Using an OpenAI LLM
export CHATLAS_OPENAI_KEY="your api key"
  1. Using LLMs via the Groq API
export CHATLAS_GROQ_BASE_URL="http://cs-513-ml003:3000"
export CHATLAS_GROQ_KEY="your groq api key"

note The API address is local to the CERN network. If not at CERN, you can forward it like so:

ssh -L 3000:cs-513-ml003:3000 <LXPLUS_USERNAME>@lxplus.cern.ch
export CHATLAS_GROQ_BASE_URL="http://localhost:3000"

Available Chains

  • chains.basic.basic_retrieval_chain
  • chains.basic_graph.basic_retrieval_graph
  • chains.advanced.advanced_rag

Postgres

If you want to create a local postgres server, you need to install psql. Some instructions to do this on macOS using homebrew are here:

Software install

brew install postgresql
brew services start postgresql
brew install pgvector
brew unlink pgvector && brew link pgvector

Create a user

psql -h localhost -U postgres
ALTER USER postgres WITH PASSWORD 'Set_your_password_here';
CREATE EXTENSION IF NOT EXISTS vector;

CHANGELOG

0.1.4

Support for Groq-hosted models

Some new functions that go beyond the "basic RAG" workflow:

  • Reciprocal Rerank Fusion chATLAS_Chains.documents.rrf.reciprocal_rank_fusion
  • Document reranking via the Pinecone API chATLAS_Chains.documents.rerank.rerank_documents
  • Query rewriting step chATLAS_Chains.query.query_rewriting.rewrite_query

These are all usable via the new chain chATLAS_Chains.chains.advanced.advanced_rag

Added unit tests to gitlab CI/CD pipeline

0.1.3

Fixing imports

Changed output format of basic_retrieval_chain (docs key is now a list of Document objects, rather than a dict)

Unit tests for basic_retrieval_chain

0.1.2

Unit tests

First Langgraph chain

0.1.1

Initial Release


📄 License

chATLAS_Benchmark is released under Apache v2.0 license.


Made with ❤️ by the ATLAS Collaboration

For questions and support, please contact

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

chatlas_chains-0.1.4.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

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

chatlas_chains-0.1.4-py3-none-any.whl (61.0 kB view details)

Uploaded Python 3

File details

Details for the file chatlas_chains-0.1.4.tar.gz.

File metadata

  • Download URL: chatlas_chains-0.1.4.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for chatlas_chains-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d897f48f3005218e952873bf99d4007f0f228df791119b80e765a18b55928574
MD5 2b36f0400d2fc1568a8446f58b468ba5
BLAKE2b-256 2ad69c14e86b7fd8a9aa59b375efd175e915acea9b3acc68bf70cd1ccb616f00

See more details on using hashes here.

File details

Details for the file chatlas_chains-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for chatlas_chains-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 55da8b5ca7179f3b3e43cd6bb14c8f9dd9680d56c7915a3d523d25addc73a8be
MD5 e3ca0ad1b040eaf3412352ad42c21ccb
BLAKE2b-256 44885b2b6e4bd536f8663609ad93d517221948b162b4e08d5e1a7df1155a1510

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