Building an AI Co-pilot for Product Strategy with LLM Integration Patterns

thoughtworks · Consulting · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.0 (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: Consulting

Thoughtworks explored how an AI co-pilot could support product strategy activities such as scenario building, ideation, concept generation, and storyboarding.

Constraints:

Architecture

Boba is a web application that mediates product-strategy tasks between a human user and OpenAI GPT-3.5/4. The task UI captures user prompts and selections, LangChain prompt templates enrich them with task-specific context, OpenAI returns structured JSON/Markdown outputs, and the UI renders scenario cards, concepts, strategies, or storyboards. Follow-up interactions carry selected UI context into contextual conversations. Research Signals adds external knowledge by querying Google SERP, fetching articles, chunking them into an in-memory HNSW vector store, and using LangChain VectorDBQAChain to answer with source-linked context. Streaming tokens back to the UI gives progress and cancellation for long generations.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  boba-web-application[Boba web application] --> task-ui[Task UI]
  task-ui --> langchain-prompt-templates[LangChain prompt templates]
  langchain-prompt-templates --> openai-llm[OpenAI LLM]
  openai-llm --> structured-response-renderer[Structured response renderer]
  openai-llm --> streaming-token-handler[Streaming token handler]
  structured-response-renderer --> task-ui
  task-ui --> select-and-carry-context[Select and carry context]
  select-and-carry-context --> contextual-conversation[Contextual conversation]
  contextual-conversation --> langchain-prompt-templates
  google-serp-api[Google SERP API] --> embedded-external-knowledge[Embedded external knowledge]
  embedded-external-knowledge --> hnsw-vector-store[HNSW vector store]
  hnsw-vector-store --> vectordbqa-chain[VectorDBQAChain]
  vectordbqa-chain --> openai-llm
  task-ui --> stable-diffusion-storyboarding[Stable Diffusion storyboarding]
  stable-diffusion-storyboarding --> openai-llm
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
boba-web-application Task-oriented web application mediating human product-strategy work with LLM calls. task-ui, langchain-prompt-templates, structured-response-renderer, contextual-conversation
task-ui Left-panel task selection plus task-specific controls such as prompts, time horizons, optimism/realism, scenario cards, and explore actions. boba-web-application, select-and-carry-context, langchain-prompt-templates
langchain-prompt-templates Task-specific prompt templates/chains that enrich naive user prompts with domain structure and selected UI context. boba-web-application, openai-llm
openai-llm GPT-3.5/4 model calls used for strategy ideas, scenarios, contextual conversations, summaries, and structured outputs. langchain-prompt-templates, structured-response-renderer, streaming-token-handler
structured-response-renderer Parses/uses JSON or Markdown structured responses and renders them as UI elements such as scenario cards. openai-llm, task-ui
streaming-token-handler Streams generations across the stack, supports progress display, cancellation, best-effort JSON parsing, and temporal state during calls. openai-llm, structured-response-renderer
select-and-carry-context Carries selected scenarios, strategies, concepts, or prompts into follow-up actions and narrower contextual conversations. task-ui, contextual-conversation
contextual-conversation Fallback/follow-up chat channel scoped to a selected idea or scenario. select-and-carry-context, langchain-prompt-templates
google-serp-api External search tool for Research Signals queries over public web information. embedded-external-knowledge
embedded-external-knowledge Research pipeline that combines search results, article text, chunking, embeddings, vector retrieval, and source-linked LLM answers. google-serp-api, hnsw-vector-store, vectordbqa-chain
hnsw-vector-store In-memory vector store used for article chunks in the prototype research feature. embedded-external-knowledge, vectordbqa-chain
vectordbqa-chain LangChain chain that queries vector-store context and prefixes retrieved results into the LLM prompt. hnsw-vector-store, openai-llm
stable-diffusion-storyboarding Visual storyboarding path where the LLM generates or revises prompts for Stable Diffusion images. task-ui, openai-llm

Data flow

A user selects a product-strategy task in the Boba web UI and enters a naive prompt plus task controls such as time horizon or realism. Boba fills a task-specific LangChain prompt template, sends it to OpenAI GPT-3.5/4, requests structured output, and renders the result as UI elements. If the user selects a scenario or concept, Boba carries that selection into a new contextual prompt. For research questions, Boba sends an enriched query to Google SERP, retrieves articles, summarizes or chunks them, creates embeddings/vector-store entries, and prefixes retrieved article context into the LLM prompt so answers include source links.

5 supporting quotes
“Boba is a web application that mediates an interaction between a human user and a Large-Language Model, currently GPT 3.5.”article, stated
“Boba will then ask the LLM to generate scenarios, using Templated Prompt to enrich the user's prompt with additional elements”article, stated
“Boba receives a Structured Response from the LLM and displays the result as set of UI elements for each scenario.”article, stated
“Boba uses Select and Carry Context to hold onto the various parts of the user's interaction with the LLM”article, stated
“It takes the prompted research query, such as “How is the hotel industry using generative AI today?”, sends an enriched version of that query to a search engine, retrieves the suggested articles, sends each article to the LLM to summarize.”article, stated

Why this architecture

Boba’s architecture exists to move beyond a plain chat box. The UI structures tasks so users can make naive prompts while the application supplies prompt context, output schemas, selected-context carry-forward, progress feedback, and retrieval/tooling when the base LLM is insufficient. The team kept prompt templates simple, used structured output so the UI could operate on LLM results, streamed long responses to keep users engaged, and controlled external search flow manually where LangChain tool autonomy produced slow or harder-to-parse results.

4 supporting quotes
“A co-pilot application like Boba adds a range of UI elements that structure the conversation.”article, stated
“This allows a user to make naive prompts which the application can manipulate, enriching simple requests with elements that will yield a better response from the LLM.”article, stated
“we decided to run a different prompt template altogether, in the interest of keeping our prompt templates from becoming too complex and hard to maintain.”article, stated
“we decided against it because it offloaded too much decision making to Langchain, and we were getting mixed, slow and harder-to-parse results.”article, stated

Models used: GPT-3.5 · GPT-4 · Stable Diffusion

Scale

Alternatives considered (roads not taken)

A simple web chat front-end to an LLM

Rejected because: Users would need to learn prompt engineering themselves; Boba structures task controls and enriches prompts for them.

“A simple web front-end to an LLM just offers the ability for the user to converse with the LLM. This is helpful, but means the user needs to learn how to effectively interact the LLM.”article, stated

Complex conditional prompt templates

Rejected because: The team preferred separate templates when inputs changed drastically, keeping templates maintainable.

“We also kept our prompt templates as simple as possible, devoid of conditional statements.”article, stated

Waiting for full LLM responses behind a spinner

Rejected because: Users lose patience on long calls, so Boba streams partial output and allows cancellation.

“a user can only wait on a spinner for so long before losing patience.”article, stated

Using LangChain external tools API to run Google search autonomously

Rejected because: It delegated too much decision-making and produced mixed, slow, harder-to-parse results.

“we decided against it because it offloaded too much decision making to Langchain, and we were getting mixed, slow and harder-to-parse results.”article, stated

Patterns

prompt-chaining (workflow)

Boba enriches a user prompt for scenario generation, then lets the user select a scenario and continue with a context-aware follow-up prompt.

“Boba will then ask the LLM to generate scenarios, using Templated Prompt to enrich the user's prompt with additional elements both from general knowledge of the scenario building task and from the user's selections in the UI.”article, stated

structured-output-contract (interface)

The application expects structured LLM responses that can be rendered as UI elements, not only free-form chat text.

“Boba receives a Structured Response from the LLM and displays the result as set of UI elements for each scenario.”article, stated

rag-retrieval (retrieval)

Boba uses search results as external knowledge before asking the LLM to summarize articles for product-strategy research.

“Boba has a feature called research signals that uses Embedded External Knowledge to combine the LLM with regular search facilities.”article, stated

Tradeoffs

How to make product-strategy LLM interactions usable for non-prompt-experts.

Chose task-specific UI controls plus templated prompt enrichment over a plain chat UI that leaves users to craft prompts manually.

Rationale: The UI can capture structured intent and context, letting users make naive prompts while Boba enriches them for better LLM responses.

“This allows a user to make naive prompts which the application can manipulate, enriching simple requests with elements that will yield a better response from the LLM.”article, stated

How to keep prompt templates maintainable.

Chose separate prompt templates for drastically different inputs over complex conditional logic inside one prompt template.

Rationale: The team found simple templates easier to maintain and swapped templates when UI context changed meaningfully.

“When we needed to drastically adapt the prompt based on the user input, such as when the user clicks “Add details (signals, threats, opportunities)”, we decided to run a different prompt template altogether”article, stated

How to implement external research search flow.

Chose explicit SERP + article processing + VectorDBQAChain flow over letting LangChain external tools API decide the whole search process.

Rationale: Manual orchestration gave more predictable and parseable behavior for search-backed research answers.

“we decided against it because it offloaded too much decision making to Langchain, and we were getting mixed, slow and harder-to-parse results.”article, stated

Evaluation

No grounded evaluation method is stated in the available input.

Outcomes

The source reads as an exploratory implementation-pattern article rather than a production scale report.