gq-insight-mcp
Enables semantic search and grounded answering over customer-research interviews, with every answer traceable to source quotes.
README
gq-insight-mcp
Semantic search and grounded answering over customer-research interviews, exposed as an MCP server, with a built-in evaluation harness.
Customer interviews pile up faster than anyone can read them. The insights are in there; getting an answer out usually means a manual export-and-skim. gq-insight turns a pile of interview transcripts into something an LLM agent can query directly: ask a question, get back the actual quotes that answer it, each one traceable to an interview, a timestamp, and a speaker.
The guiding rule: an answer may only assert what a retrieved quote supports, every claim carries a citation, and an answer that cannot be grounded is refused, not fabricated. Research tooling is only useful if every answer is traceable to source.
Demo
A narrated walkthrough: semantic search, a grounded cited answer, and the live eval scorecard. (watch on YouTube)
What it does
$ gq-insight search "why do customers churn?"
1. [INT006 @ 00:42 (P-6675)] score=0.3856
"The automation rules. I built a rule engine that auto-categorizes ..."
2. [INT005 @ 07:40 (P-5093)] score=0.3801
"The automation rules were genuinely good, and switching cost me three weeks ..."
$ gq-insight answer "what blocks the enterprise rollout?"
"SSO. We mandate SAML single sign-on for anything that touches employee data ..." [INT008 @ 00:45] ...
faithful: True (every claim cites a real quote)
$ gq-insight eval
recall@k 0.900 · MRR 0.790 · nDCG@k 0.837 · faithfulness 1.000 · ALL GATES PASS
Three capabilities, each an MCP tool an agent can call:
- Semantic search over interview transcripts, returning verbatim cited quotes.
- Grounded answering: a question in, a cited answer out, with every claim verified against a retrieved quote before it is returned.
- A live eval harness: retrieval and answer quality scored on a labeled set and gated in CI, so the tools are measurable, not vibes.
How it works
data/transcripts/*.txt 8 customer interviews, parsed into citable speaker turns
│
corpus.py turn = (interview, timestamp, speaker, text) -> the citation unit
│
index.py all-MiniLM-L6-v2 embeddings, cosine retrieval
│ (interviewer turns indexed for context, excluded from results)
├── answer.py quote-grounded answers; faithfulness verified before return
│ extractive (offline) or Ollama synthesis (verified, with fallback)
└── eval.py recall@k / MRR / nDCG@k / faithfulness vs evals/queries.jsonl
│
server.py FastMCP server: search_interviews, answer_with_citations,
list_themes, run_eval
The corpus here is 8 interviews; the retrieval contract is unchanged when you swap the exact cosine search for an approximate index (FAISS/HNSW) at tens of thousands of hours.
Quickstart
pip install -e .
gq-insight themes # list the corpus
gq-insight search "mobile receipt capture problems"
gq-insight answer "why did customers leave?" # add --backend ollama for local-LLM synthesis
gq-insight eval # quality scorecard + CI gates
pytest -q # 14 tests
Embeddings run on CPU from a small cached model; no API keys, fully offline.
As an MCP server
gq-insight-server # stdio transport
Register it with any MCP client (Claude Desktop, an agent runtime) to give the agent
search_interviews, answer_with_citations, list_themes, and run_eval tools.
Evaluation
On a 10-query labeled set (evals/queries.jsonl), all-MiniLM-L6-v2, k=6:
| metric | value | what it means |
|---|---|---|
| hit@k | 1.00 | every query surfaces a relevant interview in top-k |
| recall@k | 0.90 | fraction of relevant interviews retrieved |
| MRR | 0.79 | mean reciprocal rank of the first relevant hit |
| nDCG@k | 0.84 | rank-quality of the retrieved set |
| faithfulness | 1.00 | fraction of answers with every claim grounded in a real quote |
Two queries (onboarding, integrations) rank the right interview 4th-5th rather than 1st: a real limitation of a small embedder on abstract queries over concrete transcript language. They are kept in the set so the gate stays honest. CI gates are conservative floors (recall ≥ 0.80, MRR ≥ 0.70, faithfulness = 1.00), set below measured performance so the gate catches regressions without being gamed.
Note on the data
The interviews are synthetic but realistic, written for a fictional expense/invoicing product ("Northwind") so the recurring research themes (onboarding friction, pricing surprises, integration gaps, churn drivers, support, security) give retrieval real signal. No real customer data.
License
MIT — Yusuf Guenena
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
