Subscribe to continue reading
Become a paid subscriber to get access to the rest of this post and other exclusive content.
Become a paid subscriber to get access to the rest of this post and other exclusive content.
Become a paid subscriber to get access to the rest of this post and other exclusive content.
Fractal Chain of Thought (FCoT) is a structured reasoning methodology that analyzes complex systems, problems, or texts by executing exactly three distinct iterations, with each iteration operating at a progressively deeper layer of granularity.
The methodology evaluates the target space across three specific layers:
The execution of these iterations is guided by dual objective functions designed to balance breadth and depth:
Following a hill-climbing optimization approach, each iteration builds upon the last to refine the output, culminating in a highly structured, scannable response.
Here is our latest pattern catalog for your information.

Pattern type: Architecture / Evaluation
Context / Background
Real questions often require complementary evidence scattered across multiple documents (narrative chapters, meeting segments). Systems must retrieve from diverse sources and synthesize long‑form answers.
Problem
Single‑source or factoid QA hides failure modes: low retrieval diversity, missing complementary evidence, and weak long‑form synthesis.
Forces
Solution (overview)
Split the pipeline into (A) multi‑source retrieval (dense + reranker) and (B) a dedicated synthesis step run by a reasoning model. Evaluate with MSRS‑style tasks that require multi‑doc integration.
Solution — Ten Steps
Implementation (ADK‑style, Python skeleton)
# Pseudocode
from google.adk.agents import Agent
from google.adk.memory import InMemoryMemoryService
from google.adk.runtime import Orchestrator
retriever = DenseRetriever(index="story_or_meet.index", k=12)
reranker = VertexAIReranker(model="text-multilingual-rerank@latest")
class MultiSourceRAGAgent(Agent):
def handle(self, query: str):
initial = retriever.search(query, k=24) # high‑recall set
reranked = reranker.rerank(query, initial)
diverse = enforce_doc_diversity(reranked, per_doc_max=3, top_k=8)
prompt = build_synthesis_prompt(query, diverse)
return self.call_reasoning_llm(prompt, model="gemini-2.5-pro")
orchestrator = Orchestrator(root=MultiSourceRAGAgent(), memory=InMemoryMemoryService())
Resulting Consequences
Related Patterns: #2 Decontextualization, #5 Reasoning‑Model Synthesis, #8 Domain‑specific Retriever Pairing.
Pattern type: Data / Pre‑processing
Context / Background
Legacy datasets contain queries that implicitly rely on hidden context (e.g., “What’s the plot?”). This confuses retrieval and penalizes the wrong stage.
Problem
Ambiguous queries inflate difficulty and degrade retrieval precision; synthesis quality becomes noisy.
Forces
Solution (overview)
Rewrite queries into standalone forms before retrieval; add a light classifier that routes “underspecified” queries through a decontextualization step.
Solution — Ten Steps
Implementation (ADK‑style, micro‑agent)
class DecontextualizeAgent(Agent):
def handle(self, query: str) -> str:
if is_underspecified(query):
return rewrite_query(query, model="gemini-2.5-flash")
return query
Resulting Consequences
Related Patterns: #1 Orchestration, #6 Oracle‑Gap Diagnostic.
Pattern type: Retrieval Engineering
Context / Background
MSRS domains differ in optimal K and chunking. Narratives need more complementary slices; meetings benefit from concise, timestamped segments.
Problem
Fixed K and naïve chunking reduce complementary coverage or flood the context with redundancy.
Forces
Solution (overview)
Tune chunk size (~1K tokens), choose K to match average oracle set per domain, and enforce cross‑doc diversity with per‑doc caps before synthesis.
Solution — Ten Steps
Implementation (selection helper)
def select_diverse(chunks, per_doc_max=3, top_k=8):
out, seen = [], {}
for c in chunks:
d = c.meta["doc_id"]
if seen.get(d, 0) < per_doc_max:
out.append(c); seen[d] = seen.get(d, 0) + 1
if len(out) == top_k: break
return out
Resulting Consequences
Related Patterns: #8 Domain‑specific Pairing, #4 Long‑Context Guardrail.
Pattern type: Architecture
Context / Background
Temptation: “just stuff” the entire corpus into a long‑context model. In meetings, this often exceeds limits or degrades synthesis quality versus a strong retriever.
Problem
Truncation, noise injection, and cost explode in long‑context‑only setups.
Forces
Solution (overview)
Adopt a guardrail: default to selective retrieval; allow long‑context only when the corpus fits comfortably and shows non‑inferior performance in canary runs.
Solution — Ten Steps
Implementation (routing sketch)
if tokens(corpus) < 0.6 * CONTEXT_LIMIT and lc_performs_ok():
mode = "long_context"
else:
mode = "selective_retrieval"
Resulting Consequences
Related Patterns: #1 Orchestration, #6 Oracle‑Gap Diagnostic.
Pattern type: Generation
Context / Background
Even with oracle (gold) docs, non‑reasoning LLMs miss major/minor details in multi‑doc synthesis.
Problem
Under‑integration of evidence; shallow abstractions.
Forces
Solution (overview)
Use a reasoning LLM for the synthesis step with a scaffold that enumerates per‑doc keypoints and forces cross‑document linkage.
Solution — Ten Steps
Implementation (prompt scaffold, sketch)
SYNTH_PROMPT = f"""
You are a synthesis model. Given query Q and passages P[i] with doc_id,
write a coherent long‑form answer that integrates complementary info.
- Enumerate keypoints per doc.
- Link points across docs (agreements/contrasts).
- Cite like [D{{doc_id}}].
- Sections: Summary, Evidence, Open Questions.
Q: {{query}}
P: {{passages}}
"""
Resulting Consequences
Related Patterns: #1, #3, #6.
Pattern type: Evaluation / Diagnostics
Context / Background
We need to attribute failures to retrieval vs. generation.
Problem
Pipeline confounding hides which component to improve.
Forces
Solution (overview)
Run three controlled conditions per query: Oracle (gold docs), Strong Retriever, Long‑Context. Compare ROUGE‑1/2, BERTScore, and G‑Eval‑style rubric; add small‑scale human error tags.
Solution — Ten Steps
Implementation (runner sketch)
for mode in ["oracle", "strong_retriever", "long_context"]:
preds = run_mode(mode, dataset)
scores[mode] = compute_scores(preds, refs)
report = compare(scores)
Resulting Consequences
Related Patterns: #4 Guardrail, #9 Contamination Safeguard.
Pattern type: Data / Benchmarking
Context / Background
Benchmarks are often solvable from a single doc, defeating the point of multi‑source RAG.
Problem
Systems “cheat” by relying on one document; evaluation under‑stresses retrieval diversity and synthesis.
Forces
Solution (overview)
During dataset construction, ensure that answering the query requires at least two complementary documents; validate necessity by ablating each doc and observing score drops.
Solution — Ten Steps
Implementation
A small script computes Δscore when removing each doc; keep items with Δscore significant.
Resulting Consequences
Related Patterns: #1, #6.
Pattern type: Retrieval Engineering
Context / Background
Narrative prose and meetings differ in structure, vocabulary, and evidence distribution.
Problem
One‑size retriever fails cross‑domain; BM25 can look “good” on IR metrics but underperform on generation for meetings.
Forces
Solution (overview)
Choose per‑domain stacks (e.g., gemini‑embedding for STORY; NV‑Embed‑v2 + reranker for MEET). Use reranking depth tuned to domain.
Solution — Ten Steps
Implementation (config separation)
story: embed_model: gemini-embedding k_hi: 24 k_mid: 10 reranker: vertexai_rerank meet: embed_model: nv-embed-v2 k_hi: 18 k_mid: 6 reranker: vertexai_rerank
Resulting Consequences
Related Patterns: #3 Tuning, #4 Guardrail.
Pattern type: Evaluation Hygiene
Context / Background
Pretraining leakage can inflate scores and mask weaknesses.
Problem
Contaminated corpora compromise credibility and comparability.
Forces
Solution (overview)
Run contamination checks, report multiple retrieval settings (Oracle, SR, LC), and maintain contamination manifests.
Solution — Ten Steps
Implementation
Simple overlap heuristics (URL/domain matches, n‑gram hashes) + manual spot checks.
Resulting Consequences
Related Patterns: #6 Diagnostic, #10 Scalable Construction.
Pattern type: Process / Dataset Ops
Context / Background
Constructing multi‑source tasks by hand is costly. MSRS shows a scalable way to bootstrap from existing long‑context MDS datasets.
Problem
Quality vs. throughput trade‑off; human validation budget.
Forces
Solution (overview)
Bootstrap from long‑context, query‑focused datasets; enforce multi‑doc necessity; apply decontextualization; validate at scale with spot checks.
Solution — Ten Steps
Implementation
Provide scripts for segmentation, indexing, oracle mapping, and eval.
Resulting Consequences
Inputs: queries.jsonl (id, query), oracle.jsonl (id, doc_ids[]), refs.jsonl (id, summary), index/ (FAISS/Vertex, plus metadata), corpus/ (text).
Modes
Metrics
Runner (skeleton)
from rag_eval import rouge, bertscore, geval
def run(mode, batch):
if mode == "oracle":
ctx = pull_oracle(batch)
elif mode == "strong_retriever":
ctx = retrieve_and_rerank(batch)
elif mode == "long_context":
ctx = pack_long_context(batch)
return synthesize(ctx, model="gemini-2.5-pro")
scores = {}
for mode in ["oracle","strong_retriever","long_context"]:
preds = run(mode, dataset)
scores[mode] = {
**rouge(preds, refs),
**bertscore(preds, refs),
"geval": geval(preds, refs, judge="gemini-2.5-pro")
}
compare_and_report(scores)
Human Error Taxonomy (lightweight)
Sample 40 items and annotate: (a) missing many major details, (b) missing many minor details, (c) hallucination, (d) query misunderstanding, (e) vagueness.
gemini-embedding (story), nv-embed-v2 (meeting).gemini-2.5-pro / gemini-2.5-flash for faster ablations.InMemoryMemoryService for local runs; Memory Bank for persistence.