Building an AI-Powered Browser Extension for Product Documentation with RAG and Chain-of-Thought

reforge · Education · 2024 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Product-management documentation assistance

Reforge needed a browser extension that could help product teams draft and improve PRDs and related documents inside their existing work tools while grounding suggestions in Reforge material instead of generic LLM advice.

Constraints:

Architecture

Reforge built a browser extension that opens alongside tools such as Notion, Google Docs, Confluence, and Coda. It retrieves the user's document and prompt, classifies the document type, retrieves relevant Reforge content from embeddings/Pinecone, asks the LLM in parallel for multiple focused suggestions, streams the suggestions back to the extension, and uses analytics plus Adaline logging to evaluate prompts and outputs.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  browser-extension[Browser Extension] --> work-document[Work Document]
  browser-extension --> reforge-backend[Reforge Backend]
  reforge-backend --> document-classifier[Document Classifier]
  document-classifier --> llm-suggestion-generator[LLM Suggestion Generator]
  reforge-backend --> vector-retrieval[Vector Retrieval]
  vector-retrieval --> reforge-corpus[Reforge Corpus]
  reforge-backend --> llm-suggestion-generator[LLM Suggestion Generator]
  reforge-backend --> observability-stack[Observability Stack]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Browser Extension User-facing side panel embedded in browser-based work tools. Work Document, Reforge Backend
Work Document PRD, job description, or other user document in Notion, Google Docs, Confluence, or Coda. Browser Extension, Document Classifier
Reforge Backend Coordinates classification, retrieval, prompting, streaming, logging, and analytics. Browser Extension, Document Classifier, Vector Retrieval, LLM Suggestion Generator, Observability Stack
Document Classifier Determines document type so the system can ask appropriate questions and retrieve suitable material. Work Document, Reforge Backend, LLM Suggestion Generator
Vector Retrieval Embeds the document and prompt, searches Pinecone, and returns relevant Reforge artifacts, guides, and lessons. Reforge Backend, Reforge Corpus
Reforge Corpus Source content used to ground suggestions in Reforge programs. Vector Retrieval
LLM Suggestion Generator Produces focused suggestions from retrieved Reforge content and document-specific prompts. Reforge Backend, Document Classifier, Vector Retrieval
Observability Stack Analytics, BI, prompt logs, and output evaluation using tools such as Segment, MetaBase, Amplitude, and Adaline. Reforge Backend

Data flow

The user opens the Reforge side panel in a work document. The system reads the document and prompt, classifies the document type, embeds and searches for relevant Reforge content, retrieves metadata, sends focused prompts and context to an LLM in parallel, then streams three suggestions back to the browser extension.

“Embeddings are run on the user's document and their prompt, and a similarity search is performed using these embeddings.”article, stated
“We asked the LLM in parallel to produce a suggestion given the more specific Reforge content and the specific questions.”article, stated

Why this architecture

Reforge chose an in-workflow browser extension because users already write PRDs in tools like Notion and Google Docs. It moved beyond simple similarity RAG by classifying document type, narrowing context, asking document-specific questions, and grounding suggestions in Reforge content so outputs were more relevant than generic ChatGPT templates.

“The Reforge extension should also be more convenient because it's directly integrated into the tools you already use.”article, stated
“we determine what type of document it is, adapt the questions to that specific document, and execute a focused RAG based on limited content”article, stated

Models used: OpenAI · OpenAI embeddings · Gemini Pro 1.5 · Anthropic models

Scale

Alternatives considered (roads not taken)

Simple retrieve-and-generate RAG over document content.

Rejected because: It produced inconsistent outputs and did not solve the core customer problem reliably enough.

“While this process was a good starting point, it did not produce reliable outputs consistently and there was room for improvement.”article, stated

Generic ChatGPT or PRD-template assistance.

Rejected because: Reforge wanted content grounded in its own frameworks and embedded in the user's workflow.

“there's a marked difference between asking ChatGPT for a PRD template versus using the one in the Reforge extension.”article, stated

Commit to one model provider.

Rejected because: The team wanted to compare outputs across OpenAI, Gemini, and Anthropic models.

“I am not committed to any one specific model. The beauty of these models is their ease of use - I can create a dataset of inputs and check the outputs. For example, I could test it against OpenAI’s 4o, Gemini Pro’s 1.5, and the best model from Anthropic.”article, stated

Patterns

rag-retrieval (retrieval)

The extension embeds the user's document and prompt, searches Reforge material, and sends retrieved context to the LLM.

“Relevant Reforge material is found across artifacts, guides, and lessons.”article, stated

prompt-chaining (workflow)

Reforge classifies document type, adapts questions, and then runs focused RAG rather than asking one generic prompt.

“a chain of thought where we determine what type of document it is, adapt the questions to that specific document, and execute a focused RAG”article, stated

eval-driven-development (quality)

The team used distribution of course recommendations and reference rates as proxies for model intelligence and relevance.

“This was a great proxy for model intelligence, as a key concern is that we’re recommending relevant content.”article, stated

observability-tracing (operations)

Adaline stores prompts and logs so the team can inspect LLM inputs and outputs.

“Adaline is a tool for storing prompts and sending logs, allowing for experimentation and evaluation of the Language Model's (LLM) outputs.”article, stated

model-routing (model-strategy)

Reforge kept model choice open and framed provider comparison as part of the operating model.

“I could test it against OpenAI’s 4o, Gemini Pro’s 1.5, and the best model from Anthropic.”article, stated

Tradeoffs

Product surface

Chose Browser extension embedded in existing tools over Standalone PRD-generation product.

Rationale: The extension reduces copy-paste and tab switching by appearing where users already work.

“You don't have to copy and paste or switch tabs; it's right there for many tasks you need to do while working.”article, stated

Retrieval architecture

Chose Classified, focused RAG over Simple similarity-based RAG.

Rationale: Document-aware retrieval made suggestions more relevant to PRDs, job descriptions, and other document types.

“We received feedback from beta testers indicating that we were giving suggestions for improving a job description while they were working on a PRD”article, stated

Early cost posture

Chose Build for value first while modeling cost over Optimize cost before proving the workflow.

Rationale: The team treated cost as important but secondary to finding product value early.

“Starting from scratch allowed us to focus on building value before worrying about costs.”article, stated

Gotchas (what bit them)

Simple RAG was not reliably useful enough.

Root cause: Similarity search alone did not tailor suggestions to document type or user task.

Resolution: Add document classification, focused questions, and more specific Reforge content.

“The significant shift we made was in the classification of the documents. The suggestions we provide differ greatly depending on the document type”article, stated

The retrieval corpus was incomplete.

Root cause: Not all Reforge program content was stored in Pinecone.

Resolution: Fix corpus coverage and track recommendation distribution as a model-intelligence proxy.

“This change was due to the discovery of a bug where not all Reforge program content was stored in their Pinecone Vector Database.”article, stated

Model outputs needed visibility beyond final user-facing suggestions.

Root cause: Prompt and response behavior was hard to debug without a logging and experiment layer.

Resolution: Use Adaline for prompt storage, logs, and output evaluation.

“It provides better visibility into what's being sent to the LLM and its responses.”article, stated

Evaluation

Reforge evaluated the extension through beta feedback, course-recommendation distributions, reference-rate tracking, prompt/output logging in Adaline, and product analytics in MetaBase, Segment, Amplitude, and Snowflake.

Metrics: Distribution of course recommendations · Share of responses with no Reforge references · Prompt and output logs · User interaction analytics · Average cost per user

“We do store the distribution of course recommendations.”article, stated
“We use MetaBase for BI, Segment for data collection, and Amplitude for analytics.”article, stated

Outcomes

The source reports browser/tool coverage, three suggestions per document, less-than-50% no-reference tracking, and cost modeling per user.

“The extension can generate a draft PRD, aligning it with Reforge's 4D road mapping process”article, stated
“when we upgraded to version 4.0, we began to see a significant increase in references.”article, stated