Skip to main content

Configure ragas RAG evaluation to use AINative's free LLMs + embeddings — no OpenAI key needed.

Project description

ragas-ainative

Configure ragas to use AINative's free LLMs + embeddings for RAG evaluation. No OpenAI key needed.

Zero setup. Evaluate faithfulness, answer relevancy, and more with Llama 3.3 70B — completely free.

Install

pip install ragas-ainative

Quick Start

from ragas_ainative import configure_ragas
from ragas.metrics import faithfulness, answer_relevancy
from ragas import evaluate

configure_ragas()  # Auto-provisions free API key

results = evaluate(dataset, metrics=[faithfulness, answer_relevancy])
print(results)

How It Works

ragas-ainative is a companion package (NOT a fork) that configures ragas to use AINative's free, OpenAI-compatible API. It sets OPENAI_API_KEY and OPENAI_API_BASE so ragas routes all LLM judge calls and embeddings through AINative.

On first use, the package auto-provisions a free API key (72-hour TTL). Claim your account at ainative.studio/signup for permanent access.

Available Models

from ragas_ainative import configure_ragas

configure_ragas(model="llama")     # meta-llama/Llama-3.3-70B-Instruct (default)
configure_ragas(model="qwen")      # qwen3-coder-flash
configure_ragas(model="deepseek")  # deepseek-4-flash
configure_ragas(model="kimi")      # kimi-k2

Store Results to ZeroDB

Track evaluation scores over time:

from ragas_ainative import configure_ragas, store_results

configure_ragas()

# After evaluation
results = {"faithfulness": 0.85, "answer_relevancy": 0.92}
store_results(results, dataset_name="my-rag-pipeline")
# Stored to ZeroDB — searchable and trackable

Explicit API Key

configure_ragas(api_key="your-key-here")

Or set the environment variable:

export AINATIVE_API_KEY=your-key-here

API Key Resolution Order

  1. Explicit api_key parameter
  2. AINATIVE_API_KEY environment variable
  3. ZERODB_API_KEY environment variable
  4. ~/.zerodb/credentials.json (shared with zerodb ecosystem)
  5. Auto-provision via instant-db

Requirements

  • Python >= 3.9
  • ragas >= 0.1.0

License

MIT

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

ragas_ainative-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

ragas_ainative-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ragas_ainative-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ragas_ainative-0.1.0.tar.gz
Algorithm Hash digest
SHA256 273442464f0681e61d342232fad872894fb2fd100bf03f357f9054cd3c5c967c
MD5 7d110f053fd28f327b56420b8c165978
BLAKE2b-256 90a94e99c586388cb4b369ca6692f469283cd00d411e5b4d76f811c93726d290

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ragas_ainative-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ragas_ainative-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a04fdb36e29dcc3dcacfab0d6db1e36fe45138b0a4249b57a7642089a3c50deb
MD5 33d762604e7ad129ba06dd81b48fafbc
BLAKE2b-256 086c57b6c3178b8137543b2b82b2828b9f3d535aa682d269294a76ed61c62442

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