Eridian

Codebase Q&A

Ask grounded questions against the indexed tree and recent commits.

Codebase Q&A answers questions about how the system works, with citations into the index. It is retrieval plus inference, not a chat log of the whole monorepo.

Ask

POST /v1/dev/qa
Authorization: Bearer eridian_sk_...
Content-Type: application/json
Idempotency-Key: qa-payment-flow-2026-09-08
{
  "project_id": "prj_dev_001",
  "repository_ids": ["repo_payments_core", "repo_payments_api"],
  "model": "auto",
  "routing_policy": "quality_optimized",
  "question": "How does the payment flow retry a posting when the ledger returns 503?",
  "filters": {
    "paths": ["src/**", "internal/ledger/**"],
    "languages": ["typescript", "go"]
  },
  "features": ["pii_redaction", "semantic_cache"]
}

Required scope: dev:write for a new question, dev:read to retrieve a prior answer while retention still holds the record.

Response

{
  "id": "qa_19c4",
  "object": "eridian.dev.qa",
  "model": "gemini",
  "answer": "postEntry retries on 503 in posting.ts. The ledger requires an Idempotency-Key on append; the retry path currently omits it.",
  "citations": [
    {
      "repository_id": "repo_payments_core",
      "path": "src/ledger/posting.ts",
      "start_line": 198,
      "end_line": 220,
      "sha": "8f3a2b1c"
    }
  ],
  "eridian": {
    "request_id": "axm_req_qa_19c4",
    "route": "gemini",
    "rag_chunks": 8,
    "cache_hit": false,
    "region": "eu-west-1",
    "cost_usd": 0.012
  }
}

If retrieval finds nothing, Eridian returns HTTP 200 with answer stating that no indexed source supports the question, and citations: []. It does not invent a path. Empty citations with a confident answer is a bug. File it with contact@geteridian.com and the request_id.

Grounding rules

  • Answers must cite at least one chunk unless the question is meta (index status, repository list).
  • Citations include sha. Stale SHAs mean the index lagged a push. Reindex. See Repositories.
  • Cross-repo questions require every id to live in the same region.
  • "auto" often selects Gemini for long context, then may not fallback. Pin gpt if your eval showed tighter citations on that desk.

Conversation

Q&A is stateless per request. To continue, send prior_qa_ids:

{
  "question": "Where is that key generated?",
  "prior_qa_ids": ["qa_19c4"]
}

The gateway loads prior questions, not prior model hidden state. Maximum thread length is 12 turns. See Dev Limits.

Python

from eridian import Eridian

client = Eridian(api_key="eridian_sk_...", project_id="prj_dev_001")

result = client.dev.qa.create(
    repository_ids=["repo_payments_core"],
    model="auto",
    question="How does the payment flow retry a posting when the ledger returns 503?",
)
print(result.answer)
for citation in result.citations:
    print(citation.path, citation.start_line, citation.sha)

What not to use it for

  • Completions in the editor. Use Code Completion.
  • Merge decisions. Use Code Review.
  • Secrets. If the question would require a secret file, the index should not contain it.

See RAG Pipeline for the shared retrieval layer and Dev API for list and get.

Production API credentials are issued with an institution workspace. Contact sales if you need access.