The Answers I Didn't Trust
Building a multi-expert research tool to answer the health questions I wouldn't hand to a generic chatbot.
Most “ask an AI expert” products follow the same pipeline: scrape the open web for a topic, embed the pages into a vector database, and assume that volume averages out to accuracy. On general software or trivia questions, that approach works well enough.
Health and longevity are where it fails. The highest-ranking health content on the open web is frequently the least rigorous: SEO-optimized listicles, supplement affiliate blogs, and engagement-driven summaries. Averaging those sources together preserves the model’s confident tone while stripping away clinical nuance.
I ran into this failure mode while asking a general chatbot what my target VO₂ max should be at age 40. It returned a clean number wrapped in a reassuring paragraph. When I asked where that specific target came from, it could not cite a verifiable source.

Confidence without provenance
A general language model answers a clinical physiology question in the exact same declarative tone it uses to recommend a movie, without exposing what source it drew from. Even if that VO₂ max figure happened to be close, an unverifiable health claim is no more useful than a wrong one.
Every AI interface makes a design choice about whether its output reads as an authoritative command or a sourced claim you can inspect. I wanted to see who made the claim and where they published it.
To solve that, I built CortexPanel—a retrieval and synthesis engine backed by a curated library of books, newsletters, and long-form podcast transcripts rather than the open web. It began with twelve health and longevity researchers (including Peter Attia, Andrew Huberman, Rhonda Patrick, lipidologist Tom Dayspring, Robert Lustig, and Matthew Walker) and expanded to over eighty practitioners across health, science, business, and psychology. Ask what your VO₂ max target should be at 40, and the response attributes the answer to Attia’s framework with direct links to the exact podcast timestamp and page in Outlive.

Why raw cosine similarity ranks the wrong expert
Our initial retrieval prototype relied on standard cosine similarity against vector embeddings. We quickly found that raw cosine similarity measures lexical overlap with the user’s phrasing while ignoring domain authority.
On an early cholesterol query, a general wellness guest who happened to utter one sentence matching the exact words of my prompt scored 0.60 in cosine similarity—outranking lipidologist Tom Dayspring, whose explanations of apoB and LDL particle clearance were distributed across thousands of technical passages averaging 0.51.
To prevent a single matching sentence from outranking a career of primary research, I replaced raw cosine ordering with a four-factor composite ranking score:
rankScore = (chunkSim × 0.4) + (domainRelevance × 0.3) + (authority × 0.2) + (contentScore × 0.1)
chunkSim: Semantic similarity between the query and the transcript passage.domainRelevance: How central the query’s topic is to that expert’s overall corpus.authority: Clinical credentials or primary-research standing in the queried domain.contentScore: Information density of the passage (favoring mechanistic explanation over passing mentions).
Matryoshka vector truncation and threshold recalibration
Several days into indexing, storing 1,536-dimensional text-embedding-3-small vectors across tens of thousands of transcript chunks pushed our PostgreSQL database past 1 GB, exceeding Supabase’s 500 MB free-tier ceiling. Because OpenAI trains text-embedding-3-small using Matryoshka representation learning—where early vector dimensions encode the coarsest semantic signal—we truncated every stored embedding from 1,536 dimensions to 512. Database storage dropped by 66% with no measurable loss in retrieval recall.
Truncating and re-normalizing the vectors had an unexpected side effect: shorter normalized vectors shifted cosine similarity distributions upward across all queries, invalidating our UI confidence badges overnight. Our original High / Moderate / Tangential cutoffs (0.25 / 0.15 / 0.10) began classifying weak matches as High confidence. We had to benchmark and recalibrate the thresholds twice against a golden query set—settling at 0.55 / 0.45 / 0.35—before the UI badges accurately reflected retrieval quality again.
Seating the council and leading with divergence
Wiring pgvector to an LLM gets a basic RAG demo running in an evening. The harder product problem is deciding who sits on the five-person panel and how five independent voices are presented without collapsing back into generic chatbot prose.

In our first UI iteration, submitting a question returned five standalone expert cards stacked vertically. If Peter Attia and Robert Lustig disagreed on saturated fat or fructose metabolism, the reader had to scroll through five separate cards and spot the contradiction manually.
To surface those fault lines immediately, I added a streamed Moderator synthesis card at the top of the Answer page. As the five individual expert cards complete, the Moderator synthesizes their positions using inline citation keys ([A1], [H2]) that scroll directly to the underlying transcript quote. The Moderator prompt enforces a strict rule against false consensus: if three researchers agree and one dissents, it names the majority position and states the dissent explicitly. When the panel splits, the card opens with a [DIVERGENCE] badge and maps the exact point of disagreement before summarizing areas of consensus.
The visual hierarchy reinforces that separation: individual expert cards sit on a warm light-paper canvas, while the dark slate surface and gold accent token are reserved exclusively for the Moderator synthesis card.
Third-person attribution over persona roleplay
Before launching the app publicly, I audited expert website terms of service and publicity rights. Peter Attia’s site terms included an explicit clause specifying $250,000 in liquidated damages per violation for unauthorized AI voice or persona impersonation.
Even setting legal terms aside, having an LLM generate first-person prose (“I tell my patients…”) felt deceptive the moment a summary drifted even slightly from the transcript. I rewrote every generation prompt across the pipeline: CortexPanel never roleplays in the first person. Every expert card is written in third-person editorial attribution (“Attia argues that…”) anchored around verbatim blockquotes from the retrieved sources.
We also added a Receipts layer to expose what the retrieval engine excluded:
- Not Seated: Directly below the five active panel members, the UI lists the four runner-up experts who were evaluated for the query and states why they were left off (for example, their highest-scoring passages covered general sleep hygiene rather than the specific sleep-apnea mechanism asked about).
- Explicit negative receipts: When a seated expert has no passages passing the relevance threshold for a question, their card refuses to speculate and prints a direct receipt: “Nothing on this from Andrew Huberman. Searched his indexed episodes and found no direct discussion of this topic.”
Building Picks and fixing two entity-extraction bugs
Picks is the product and protocol index inside CortexPanel—cataloging supplements, lab tests, wearables, and books that experts have discussed on the record, ranked by how many panel members independently endorse them. Picks contains zero affiliate links and zero sponsored placements; commercial podcast ad reads are filtered out during transcript ingestion.

Cleaning the extracted entity catalog across thousands of spoken transcripts surfaced two memorable data bugs:
- The literal
"null"brand string: Our extraction prompt instructed the model to return"brand if mentioned, or null". Roughly a third of the time, the model returned the four-character string"null"instead of a JSONnullliteral, and our slug generator created 149"null"brands in production (null-crestor,null-magnesium,null-dexa-scan). - Common English nouns matching startup names: To display relevant product pills beneath an answer, we initially ran case-insensitive substring matching between product names and the generated answer text. Because consumer wellness brands frequently name themselves after common English words, the fasting app Zero, the meditation app Calm, and the continuous glucose monitor Levels attached themselves as recommended products whenever an expert used the phrases “zero evidence,” “keep calm,” or “insulin levels.” We fixed this by partitioning the catalog into distinctive identifiers (
ag1,oura-ring,rapamycin) and common-word nouns (zero,calm,levels,eight). Common-word products are blocked from text matching and only attach when a retrieved source chunk in the answer carries a direct foreign-key link to that product endorsement.
Evaluating corpus coverage
To measure where the retrieval pipeline failed, I built a 56-question evaluation suite spanning in-domain clinical queries, out-of-domain refusal traps (such as asking a medical panel “What is the best JavaScript framework?” to verify they decline to answer), and multi-expert comparisons.
The baseline pass rate was 79%, and nearly every failure traced back to corpus coverage rather than prompt phrasing. Researchers whose full archives were indexed (such as Peter Attia and Lex Fridman) passed 100% of their test queries, whereas Andrew Huberman and Rhonda Patrick initially failed roughly half of theirs simply because our initial ingestion batch had only indexed a fraction of their back-catalog episodes. Backfilling Huberman’s missing episode transcripts raised his evaluation pass rate to 86% without changing a line of prompt code.
CortexPanel is live at cortexpanel.com. When you ask what your VO₂ max target should be at 40, it returns Attia’s exact age-decade targets alongside the podcast timestamp and the chapter in Outlive where he defines them.