ChatBGC: Asking Questions of Biosynthetic Gene Cluster Data in Plain Language

ChatBGC: Asking Questions of Biosynthetic Gene Cluster Data in Plain Language

ChatBGC Project

Project Description


ChatBGC lets researchers ask questions about biosynthetic gene cluster (BGC) data in plain English. Instead of writing SQL against large antiSMASH result tables, you can ask “Which genomes carry both an NRPS and a lanthipeptide cluster?” and ChatBGC turns the question into a database query, runs it, and summarizes the answer.

It works on the antiSMASH DuckDB databases produced by our genome-mining workflow BGCFlow, and it is built to run locally on open-weight LLMs, so unpublished genome data never has to leave the lab.

How It Works

  • Retrieval-augmented text-to-SQL: LlamaIndex retrieves the relevant tables, columns, and curated example questions before the LLM writes a query
  • Agentic pipeline: a five-phase LangGraph workflow (capture → retrieve → plan → fetch → interpret) with visible chain-of-thought reasoning
  • Self-correction: automatically refines queries that fail or return empty results
  • Factual summaries: answers are grounded in the returned rows, with no speculation
  • Local-first: runs with llama.cpp or Ollama on open models (tested with Qwen3.6-35B-A3B), with optional OpenAI or Anthropic backends

Evaluation

ChatBGC is benchmarked against a curated set of question–answer pairs with PromptFoo. Langfuse traces each query phase by phase, so prompt and model changes can be tested for regressions.

Team Members

Avatar

Matin Nuhamunada

Assistant Professor

Avatar

Kayla Queenazima

Research Assistant