Skip to content

leochlon/hallbayes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Berry

Workflow verification playbooks

Want the “with vs without hallucination detector” experience? Start here:

  • docs/workflows/README.md — index of workflow playbooks
    • Search & Learn
    • Generate Boilerplate/Content
    • Inline Completions
    • Greenfield Prototyping
    • RCA Fix Agent

Each playbook includes a maximally contrasting worked example (❌ vibes vs ✅ evidence + verifier).

Berry runs a local MCP server with a safe, repo‑scoped toolpack plus verification tools (detect_hallucination, audit_trace_budget).

Berry ships a single MCP surface: classic.

Classic includes:

  • Verification tools (detect_hallucination, audit_trace_budget)
  • Run & evidence notebook tools (start/load runs, add/list/search spans)

See docs/MCP.md and docs/workflows/README.md.

Berry integrates with Cursor, Codex, Claude Code, and Gemini CLI via config files committed to your repo.

Supported verifier backends

Berry’s current verification method requires token logprobs (Chat Completions-style logprobs + top_logprobs).

Supported today:

  • openai (default): OpenAI-compatible Chat Completions endpoints with logprobs (OpenAI, OpenRouter, local vLLM, or any compatible base_url)
  • gemini: Gemini Developer API generateContent with token logprobs via logprobsResult (when enabled for the model)
  • vertex: Vertex AI generateContent (Gemini models) with token logprobs via logprobsResult
  • dummy: deterministic offline backend for tests/dev

Not supported yet:

  • Anthropic (OpenAI-compat layer ignores logprobs)

Quickstart

  1. Install (from this repo):
pipx install -e .

Fallback:

pip install -e .
  1. In the repo you want to use:

First, set your verifier API key (recommended):

berry setup

Then install repo-scoped MCP config files:

berry init

Optional: enable strict verification gates for that repo:

berry init --strict
  1. Reload MCP servers in your client.

Optional: register Berry globally (user-level configs) so you don't have to commit repo files:

berry integrate

# macOS .pkg installers may also deploy system-managed configs:
#   berry integrate --managed-only
  1. Use a prompt/workflow (Search & Learn (verified), Generate Boilerplate/Content (verified), Inline completion guard, Greenfield prototyping, RCA Fix Agent).

Docs

  • docs/USAGE.md — task‑oriented guides
  • docs/CLI.md — command reference
  • docs/CONFIGURATION.md — config files, defaults, and env vars
  • docs/MCP.md — tools/prompts and transport details
  • docs/PACKAGING.md — release pipeline (macOS pkg + Homebrew cask)

Tests

pytest

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5