<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hello Insurance</title>
    <description>The latest articles on DEV Community by Hello Insurance (@hello-insurance).</description>
    <link>https://dev.to/hello-insurance</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1690418%2F063901c5-ccaa-4f0d-87ef-e403a0ee5fe1.png</url>
      <title>DEV Community: Hello Insurance</title>
      <link>https://dev.to/hello-insurance</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hello-insurance"/>
    <language>en</language>
    <item>
      <title>Future of Agentic Underwriting Workbench</title>
      <dc:creator>Hello Insurance</dc:creator>
      <pubDate>Sun, 03 Aug 2025 23:52:46 +0000</pubDate>
      <link>https://dev.to/hello-insurance/future-of-agentic-underwriting-workbench-5882</link>
      <guid>https://dev.to/hello-insurance/future-of-agentic-underwriting-workbench-5882</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;We didn’t start by asking how to add agents to underwriting. We asked how underwriting should work in an agentic world, and built from there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After months of quiet iteration, we're opening the doors to what we've been building:&lt;br&gt;
The &lt;strong&gt;Agentic Underwriter Workbench&lt;/strong&gt; a modern, extensible platform designed from first principles to support experimentation, scale, and AI-native underwriting.&lt;/p&gt;

&lt;p&gt;Demo at &lt;a href="https://www.youtube.com/watch?v=Wm7BROVPLbI" rel="noopener noreferrer"&gt;Future of Agentic Underwriting&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why We Built This
&lt;/h2&gt;

&lt;p&gt;Too many GenAI projects start with the tech and retrofit the workflow.&lt;/p&gt;

&lt;p&gt;We did the opposite. We mapped how underwriting should work if built today  with connected agents, schema-first design, flexible product modeling, and an interface that treats intelligence as a teammate, not a sidecar.&lt;/p&gt;

&lt;p&gt;This is the foundation.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Makes It Different
&lt;/h2&gt;

&lt;p&gt;Here’s a preview of the architectural highlights:&lt;/p&gt;

&lt;h3&gt;
  
  
  Cortex: Pluggable AI Engine
&lt;/h3&gt;

&lt;p&gt;Built in FastAPI with swappable LLMs (OpenAI, Anthropic, Gemini, Phi) via config, Cortex is designed for goal-based, multi-agent orchestration and modular tool invocation via JSON-RPC.&lt;/p&gt;

&lt;h3&gt;
  
  
  Schema-Driven Dynamic Forms
&lt;/h3&gt;

&lt;p&gt;Using rjsf + shared AJV-validated datacontracts, we render multi-product forms (Life, Auto, Renters...) from JSON Schema. The data capture form for product lines are defined at the schema level to avoid costly UI rewrites needed for new product lines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Activity Stream: A Living Timeline
&lt;/h3&gt;

&lt;p&gt;Think GitHub meets audit logs. Built with Zustand, Fuse.js, and UI card components, the stream captures all events (ratings, comments, file uploads) in a searchable, real-time feed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agentic UI
&lt;/h3&gt;

&lt;p&gt;The assistant panel is persistent, context-aware, file-friendly, and can run in recommend or autonomous mode, just like a teammate. It integrates deeply with the rest of the workflow, not bolted onto the side.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design Language Inspired by NotebookLM
&lt;/h3&gt;

&lt;p&gt;We were inspired by what made Google’s NotebookLM intuitive and borrowed its principles:&lt;/p&gt;

&lt;p&gt;Left nav for queue context&lt;br&gt;
Central workspace for focus&lt;br&gt;
Right assistant panel for support&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2w29dxgb1oaj9d2glwjo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2w29dxgb1oaj9d2glwjo.png" alt="Hi Underwriting Workbench" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5vc86ztvrigiu962ddl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5vc86ztvrigiu962ddl.png" alt="Google Notebooklm" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;This post lays the groundwork. In future installments, we’ll go deeper into:&lt;/p&gt;

&lt;p&gt;Cortex’s evolving multi-agent orchestration engine&lt;br&gt;
The JSON-RPC + MCP architecture behind tool invocation&lt;br&gt;
UI design trade-offs around schema-first workflows&lt;br&gt;
Creating agent memory and semantic retrieval layers&lt;br&gt;
Embedding underwriting intelligence into every pixel of the platform&lt;/p&gt;

&lt;p&gt;We’re building this in the open.&lt;/p&gt;

&lt;p&gt;If you're working on underwriting, claims automation, agentic workflows, or GenAI-driven UIs—we’d love to connect.&lt;/p&gt;

&lt;p&gt;Built by a folks that’s lived the technology pain in insurance, and dont want to duct-tape AI to legacy systems.&lt;/p&gt;

&lt;p&gt;Feel free to check us out at &lt;a href="http://helloinsurance.substack.com" rel="noopener noreferrer"&gt;http://helloinsurance.substack.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agentic</category>
      <category>ai</category>
      <category>insurance</category>
      <category>programming</category>
    </item>
    <item>
      <title>Growing the Tree: Multi-Agent LLMs Meet RAG, Vector Search, and Goal-Oriented Thinking - Part 2</title>
      <dc:creator>Hello Insurance</dc:creator>
      <pubDate>Sun, 04 May 2025 15:14:27 +0000</pubDate>
      <link>https://dev.to/hello-insurance/growing-the-tree-multi-agent-llms-meet-rag-vector-search-and-goal-oriented-thinking-part-2-3ck</link>
      <guid>https://dev.to/hello-insurance/growing-the-tree-multi-agent-llms-meet-rag-vector-search-and-goal-oriented-thinking-part-2-3ck</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Simulating Better Decision-Making in Insurance and Care Management Through RAG&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the Part 1 &lt;a href="https://dev.to/hello-insurance/building-a-cli-for-multi-agent-tree-of-thought-from-idea-to-execution-part-1-3f84"&gt;post&lt;/a&gt;, I walked through how I built a CLI that runs multi-agent conversations in a social media (Reddit-inspired) conversation thread style. Each persona responds, builds off the others, and together they simulate a deeper discussion. It worked, but it had limits. The agents lacked memory. They didn't have direction. And they couldn’t access supporting documents. As I said in the previous post, I made some updates to incorporate improvements.&lt;/p&gt;

&lt;p&gt;This post covers the updates I have made:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added a goal round.&lt;/li&gt;
&lt;li&gt;Each agent can now reference external files (support for URLs coming next).&lt;/li&gt;
&lt;li&gt;Integrated Qdrant and OpenAI embeddings for retrieval-augmented generation (RAG).&lt;/li&gt;
&lt;li&gt;Started scoring how well responses relate to retrieved context.&lt;/li&gt;
&lt;li&gt;Showcasing the decision goal round with some real business use cases (Auto Insurance Quote and developing a Care Plan).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  More Flexible Persona Design
&lt;/h3&gt;

&lt;p&gt;In our earlier version, personas were defined directly inside the CLI using --persona flags. That worked, but it got messy quickly. With this update, I have moved persona definitions into a standalone personas.json file.&lt;/p&gt;

&lt;p&gt;This change gave us a lot more flexibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unlimited(within reason) personas.&lt;/li&gt;
&lt;li&gt;Each persona can now define a regular_prompt, goal_prompt, and ref_files.&lt;/li&gt;
&lt;li&gt;We can assign unique files for each persona to ground their responses.&lt;/li&gt;
&lt;li&gt;It keeps the CLI clean while making persona behaviors extensible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have also introduced a schema file (persona.schema.json) to validate each persona object. This schema ensures that required fields are present, and that file references are structured consistently. That structure not only helps us catch errors early, but also gives us a stable contract to build tooling, validations, and even a visual persona builder down the line.&lt;/p&gt;

&lt;p&gt;This design opens up new paths for evolving the system: dynamic persona loading, fine-tuned goal routing, optimized routes for each persona, or even persona specialization per domain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
  {
    "name": "Surgeon",
    "llm": "ChatGPT",
    "model": "gpt-3.5-turbo",
    "engagement": 1,
    "references": [
      { "type": "file", "value": "./ref-files/caremgmt-hip/hip-replacement-recovery.md" },
      { "type": "file", "value": "./ref-files/caremgmt-hip/patient-background.md" }
    ],
    "regular_prompt": "You are the orthopedic surgeon who performed the hip replacement. Offer clinical insights on the patient's recovery trajectory, highlight any red flags to watch for, and ensure the physical milestones are on track.",
    "goal_prompt": "Summarize your final post-operative assessment for Mrs. Carter's hip replacement recovery. Highlight red flags, clearance criteria for outpatient PT, and any clinical restrictions that must be followed."
  },
  {
    "name": "Care Manager",
    "llm": "ChatGPT",
    "model": "gpt-3.5-turbo",
    "engagement": 1,
    "references": [
      {   "type": "vector:qdrant",
      "value": "collection=care_guidelines,product=care" },
      { "type": "file", "value": "./ref-files/caremgmt-hip/patient-background.md" }
    ],
    "regular_prompt": "You are a care management specialist assigned to Mrs. Carter. Evaluate discharge readiness, ensure safe transitions, and recommend support services such as PT, home health, or equipment based on her environment and needs.",
    "goal_prompt": "Submit a structured care coordination plan for Mrs. Carter. Include: (1) home health referrals, (2) safety enhancements, (3) follow-up schedule, and (4) caregiver instructions."
  },
  {
    "name": "Michael (Son)",
    "llm": "ChatGPT",
    "model": "gpt-3.5-turbo",
    "engagement": 1,
    "references": [
      { "type": "file", "value": "./ref-files/caremgmt-hip/patient-background.md" }
    ],
    "regular_prompt": "You are Michael, Mrs. Carter’s son. Express family concerns, ask questions about her safety and comfort, and advocate for what would help her most during recovery at home.",
    "goal_prompt": "List your top 2–3 concerns for your mother's recovery and what kind of help you hope the care team can provide. Be specific about her home environment and daily challenges."
  }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Adding a Goal Round
&lt;/h3&gt;

&lt;p&gt;Conversations need direction. Without it, threads drift.&lt;/p&gt;

&lt;p&gt;I have introduced a goal round to ground the discussion. It's simple: before any agents speak, the system sets a clear goal for the conversation. That goal gets injected into the first message and referenced in later turns.&lt;/p&gt;

&lt;p&gt;The system now supports structured goal types like decision, summary, consensus, reflection, and rebuttal. These give the conversation a clear intent for its final round. In this update, I have implemented the decision goal, where each agent weighs the discussion and makes a call. This structure helps tie the conversation together and surface final judgments in a consistent, directed way.&lt;/p&gt;

&lt;p&gt;This change alone made the threads feel more cohesive. Instead of rambling or contradicting each other, the agents start circling the same target.&lt;/p&gt;




&lt;h3&gt;
  
  
  File Support for Personas
&lt;/h3&gt;

&lt;p&gt;Next, I gave agents some superpowers—aka access to external files. Now, each persona can have a references field that lists one or more local files. Those files get summarized and added into that agent's system prompt.&lt;/p&gt;

&lt;p&gt;In this iteration, it's straightforward. The files are short and injected as-is. At this point, I haven’t implemented chunking or RAG. But even with basic support, it unlocked new use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Underwriters referencing a rate table&lt;/li&gt;
&lt;li&gt;Care planners reading recovery guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is: agents can now ground their reasoning over real documents, not just a one-shot prompt.&lt;/p&gt;

&lt;p&gt;Combined with the new persona file format, this setup lets each agent control its own references independently. We can fine-tune prompts and contextual grounding per persona, which is critical for simulating real-world expertise.&lt;/p&gt;

&lt;p&gt;And as we evolve the system—adding chunked documents, URL-based sources, or dynamic embedding refreshes—this design scales naturally without breaking the prompt pipeline.&lt;/p&gt;




&lt;h3&gt;
  
  
  Retrieval-Augmented Generation (RAG) with Qdrant
&lt;/h3&gt;

&lt;p&gt;Once file support worked, I took the next iteration further. Instead of shoving full files into prompts, I started embedding content and retrieving only what’s relevant.&lt;/p&gt;

&lt;p&gt;This can be broken down into three stages&lt;/p&gt;

&lt;h4&gt;
  
  
  Tool Selection: Embedding and Vector DB
&lt;/h4&gt;

&lt;p&gt;Each chunk is embedded using &lt;a href="https://openai.com/index/new-embedding-models-and-api-updates/" rel="noopener noreferrer"&gt;OpenAI’s&lt;/a&gt; &lt;code&gt;text-embedding-3-small&lt;/code&gt;. I evaluated a few options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9wx5pwdnynjfchey0rg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9wx5pwdnynjfchey0rg.png" alt="Embedding Comparison" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To keep things simple and reduce friction, I went with &lt;strong&gt;OpenAI&lt;/strong&gt;. I am already using OpenAI APIs, so this choice aligned with my stack. The embeddings are fast, cost-effective, and accurate enough for what I needed. This let me move faster without spinning up additional infrastructure.&lt;/p&gt;

&lt;p&gt;As for the vector store, here’s a quick comparison of Open Source self-hosting options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94bdg8lks5pg0uozsj7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94bdg8lks5pg0uozsj7a.png" alt="Vector Database Comparison" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I ultimately chose &lt;a href="https://qdrant.tech/" rel="noopener noreferrer"&gt;Qdrant&lt;/a&gt;. It hit the right balance for my needs: easy to host and integrate, flexible enough for semantic search, and well-documented. It supports multiple embedding types (I plan to use video/image embedding in future) and matched my goal of keeping iteration speed high without sacrificing performance.&lt;/p&gt;

&lt;h4&gt;
  
  
  Qdrant Setup: Embedding and Upload
&lt;/h4&gt;

&lt;p&gt;To embed and load documents, I run a containerized process that uses our upload_to_qdrant.py script.&lt;/p&gt;

&lt;p&gt;Example command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --rm \
  --add-host=host.docker.internal:host-gateway \
  -e OPENAI_API_KEY=$OPENAI_API_KEY \
  -e QDRANT_HOST=host.docker.internal \
  -v "${PWD}/vector-setup:/app" \
  multillm-tot-vector-setup \
  python /app/upload_to_qdrant.py \
    --folder /app/caremgmt-hip \
    --manifest /app/hello-care-guidelines.json \
    --collection care_guidelines
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script reads a manifest file, embeds Markdown documents, and uploads them to a named Qdrant collection with all metadata (title, tags, filename, etc.).&lt;/p&gt;

&lt;h4&gt;
  
  
  Retrieval Flow During Conversation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;When a persona is about to respond, we embed the current message (and optionally, the goal).&lt;/li&gt;
&lt;li&gt;We query Qdrant to retrieve the top-matching chunks.&lt;/li&gt;
&lt;li&gt;Retrieved chunks are deduplicated by filename and section title to avoid redundant context.&lt;/li&gt;
&lt;li&gt;The final set of unique chunks is injected into the agent's system prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives us tight, focused prompts that still bring in meaningful external knowledge, without blowing past token limits.&lt;/p&gt;

&lt;p&gt;This setup let us scale cleanly from static file injection to dynamic retrieval across large corpora.&lt;/p&gt;

&lt;h4&gt;
  
  
  RAG Beyond Vector Search
&lt;/h4&gt;

&lt;p&gt;It’s worth noting that while RAG often gets reduced to “just vector search,” a full retrieval-augmented system touches multiple layers of infrastructure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vector DB — for semantic similarity search (e.g., Qdrant)&lt;/li&gt;
&lt;li&gt;Search DB — for keyword/hybrid retrieval (e.g., Elasticsearch)&lt;/li&gt;
&lt;li&gt;Document DB — for managing source documents, versions, and metadata&lt;/li&gt;
&lt;li&gt;Graph DB — for modeling relationships and entity linkages; believed to be a key frontier for improving reasoning and recall&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RAG doesn’t have to use all of these at once, but thoughtful integration of more than one often leads to better relevance, traceability, and depth. As these systems matures, this kind of architecture is something we should keep in mind.&lt;/p&gt;




&lt;h4&gt;
  
  
  Introducing a RAG Score
&lt;/h4&gt;

&lt;p&gt;To understand how well each agent is using the context, I started experimenting with a &lt;strong&gt;RAG score&lt;/strong&gt;. It's not fancy. Right now, I am just checking semantic similarity between the agent's response and the retrieved chunks.&lt;/p&gt;

&lt;p&gt;The idea is to track alignment. Are they using what was retrieved? Are they staying on topic? This score isn’t exposed to the agents, but it's useful for me as a debugging and tuning tool.&lt;/p&gt;

&lt;p&gt;Down the line, this could be used to drive filtering, voting, or reward signals.&lt;/p&gt;




&lt;h4&gt;
  
  
  Real-World Use Cases
&lt;/h4&gt;

&lt;p&gt;I tested all this on two business use cases. Both were grounded in actual vector-embedded files that agents used to retrieve context. The inputs were curated, and the outputs were near-perfect. The real world is never that simple. Creating the knowledge base itself is a long, arduous task. And that’s where most of the work lies. Fortunately, with LLMs, it's now easier than ever to build and enrich that knowledge base.&lt;/p&gt;

&lt;h5&gt;
  
  
  1️⃣Auto Insurance Underwriting
&lt;/h5&gt;

&lt;p&gt;Prompt&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are reviewing an auto insurance application. Make a timely decision on whether to approve with terms or decline coverage.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;CLI Command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python main.py \
  --prompt "You are reviewing an auto insurance application. Make a timely decision on whether to approve with terms or decline coverage." \
  --rounds 2 \
  --personas-file './input/underwriting-auto/insurance-personas.json' \
  --output html \
  --save-to './output/underwriting-auto/submission-discussion.html'
  --goal-round decision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqw5vpkyyne950jux7wd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqw5vpkyyne950jux7wd8.png" alt="Screen copy of the underwriting output html" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I ran a conversation where agents assessed risk for an auto insurance policy. Three agents participated: Insurance Agent, Underwriter, and Actuary.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Insurance Agent had access to the submission application (submission-application.md).&lt;/li&gt;
&lt;li&gt;The Actuary used a static rate table (underwriting-rate-table.md) and underwriting guidelines (underwriting-guidelines.md).&lt;/li&gt;
&lt;li&gt;The Underwriter had access to all of the above plus the applicant's claims history (loss-history.md) and underwriting decision workflow (vector embedding).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Files used for RAG were embedded via Qdrant, and the persona prompts were grounded in their respective views. This made it possible to have a multi-perspective evaluation of the same submission with clear logic, tradeoffs, and pricing risk assessments.&lt;/p&gt;

&lt;h5&gt;
  
  
  2️⃣Care Planning
&lt;/h5&gt;

&lt;p&gt;Prompt&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are developing a personalized care plan for Mrs. Elaine Carter, a 62-year-old woman recovering from a total left hip replacement. Collaborate across clinical, care coordination, and family perspectives to ensure a safe recovery, appropriate support services, and readiness for outpatient transition.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;CLI Command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python main.py \
  --prompt "You are developing a personalized care plan for Mrs. Elaine Carter, a 62-year-old woman recovering from a total left hip replacement. Collaborate across clinical, care coordination, and family perspectives to ensure a safe recovery, appropriate support services, and readiness for outpatient transition." \
  --rounds 2 \
  --personas-file './input/caremgmt-hip/care-personas.json' \
  --output html \
  --save-to './output/caremgmt-hip/care-plan-discussion.html'
  --goal-round decision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobolc54runqstsitm779.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobolc54runqstsitm779.jpg" alt="Screen copy of the care management output html" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a discussion around a 62-year-old woman recovering from hip replacement surgery (Mrs. Carter). The setup included a Surgeon, a Care Manager, and the patient’s son (Michael).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Surgeon referenced a clinical recovery timeline (hip-replacement-recovery.md).&lt;/li&gt;
&lt;li&gt;The Care Manager retrieved content from a vectorized care guideline (care-guidelines.md) and a home safety checklist (home-environment-checklist.md).&lt;/li&gt;
&lt;li&gt;Michael (the son) responded based on family-provided background info (patient-background.md).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The responses were coordinated, personalized, and relevant. They showed how each persona could bring its expertise forward while grounding its reasoning in specific content. This approach supports everything from planning safe discharge protocols to modeling risk acceptance for a new policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;As you can see in the screenshot, the agent made a decision, offered supporting recommendations, and explained the rationale, in structured JSON format. In real-world settings like underwriting or care planning, this kind of assistive intelligence could save valuable time for teams constrained by human capacity. &lt;br&gt;
It’s not about replacing knowledge workers, it's about surfacing relevant context and generating suggestions before the case is even reviewed. Think of it as a recommendation engine: one that boosts productivity, speeds up decision cycles, and creates a more consistent starting point for complex decisions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both of these showed us this setup isn't just a hello-world implementation of Agentic RAG. It's a flexible system for making decisions with embedded context and specialized roles.&lt;/p&gt;




&lt;h4&gt;
  
  
  What's Next
&lt;/h4&gt;

&lt;p&gt;Here’s what I am looking at next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chunking strategies for longer documents&lt;/li&gt;
&lt;li&gt;Incorporating external URLs&lt;/li&gt;
&lt;li&gt;CAG(Cache Augumented Retrieval) for less frequently changing sources&lt;/li&gt;
&lt;li&gt;Voting, route pruning, and exploration strategies for agents&lt;/li&gt;
&lt;li&gt;Mindmap or workflow views for agent threads&lt;/li&gt;
&lt;li&gt;Semantic grouping of documents&lt;/li&gt;
&lt;li&gt;Real-time updates to vector embeddings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the first version was about simulating conversation, this version is about adding memory, purpose, and context. It’s no longer just talk. Now, the tree can think 🧠.&lt;/p&gt;

&lt;p&gt;While this tool taught me a lot about prompt orchestration, vector-based retrieval, and agent coordination, I wouldn’t necessarily re-implement it in a production stack. For real-world use, I’d probably reach for tools like AutoGen, LangGraph, Dify, or Flowise, etc., which are built for scalability and orchestration out of the box.&lt;/p&gt;

&lt;p&gt;That said, building it from scratch gave me a far deeper appreciation for how these systems work under the hood.&lt;/p&gt;

&lt;p&gt;👉 The full repo is open source. Feel free to follow along or contribute to the code on &lt;a href="https://github.com/gajakannan/public-showcase" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;




&lt;h4&gt;
  
  
  Personal Reflections on Prompting
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Although I consider myself an advanced prompt user, I learned a lot more during the buildout of this tool. Designing for multi-agent orchestration, goal alignment, and context-aware interactions pushed me to understand how prompts interact, not just with the LLM, but with each other. The nuances of injection order, repetition, and grounding became far more visible at scale than they ever did in single-agent experiments. &lt;br&gt;
At their core, agentic systems like this rely on orchestrated prompt scaffolding (injection and chaining) and semantic retrieval. And when composed correctly, that scaffolding can mimic thought, enabling agents to weigh tradeoffs, simulate judgment, and converge on decisions that feel intentional. &lt;br&gt;
Maybe that’s what humans do too. We just don’t think of it in terms of prompt flows and vector contexts. &lt;br&gt;
It’s like a chef crafting a dish, they’re not magically creating ingredients, but they know how to combine them in a way that feels like magic. And often, that’s just enough to feed the hungry crowd!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>vectordatabase</category>
      <category>rag</category>
      <category>llm</category>
      <category>agenticai</category>
    </item>
    <item>
      <title>Building a CLI for Multi-Agent Tree-of-Thought: From Idea to Execution - Part 1</title>
      <dc:creator>Hello Insurance</dc:creator>
      <pubDate>Sun, 04 May 2025 14:37:36 +0000</pubDate>
      <link>https://dev.to/hello-insurance/building-a-cli-for-multi-agent-tree-of-thought-from-idea-to-execution-part-1-3f84</link>
      <guid>https://dev.to/hello-insurance/building-a-cli-for-multi-agent-tree-of-thought-from-idea-to-execution-part-1-3f84</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;What if LLMs had opinions and argued in threads? What happens when we give LLMs not just memory and tools, but also autonomy, voices, perspectives, and structure?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I built a simple CLI tool, a tiny experiment in multi-agent, tree-of-thought reasoning. The tool lets you simulate a conversation between different AI personas, each contributing their thoughts in a threaded format.&lt;/p&gt;

&lt;p&gt;This concept of enabling language models to work together to solve complex problems, with each agent assuming a unique role based on its strengths, is a central tenet of multi-agent LLM systems. Such systems are often observed to outperform traditional single-agent models, particularly when dealing with intricate tasks that necessitate diverse expertise and collaborative decision-making.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛠️ The CLI: What It Does
&lt;/h3&gt;

&lt;p&gt;The CLI tool I built supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defining multiple personas (e.g., Philosopher, Technologist, Policymaker, Educator)&lt;/li&gt;
&lt;li&gt;Assigning each a role or lens to interpret the prompt&lt;/li&gt;
&lt;li&gt;Running rounds of discussion threads (like Reddit comments)&lt;/li&gt;
&lt;li&gt;Outputting results in HTML, Markdown, or JSON&lt;/li&gt;
&lt;li&gt;Optional logging of engagement and “most insightful” paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first part wasn’t meant to be a goal-oriented enterprise-grade agent framework. It’s intentionally simple, an experiment in structure, not infrastructure.&lt;/p&gt;

&lt;p&gt;👉 Git repo: &lt;a href="http://github.com/gajakannan/public-showcase/tree/main/multillm-tot" rel="noopener noreferrer"&gt;http://github.com/gajakannan/public-showcase/tree/main/multillm-tot&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Try It Yourself
&lt;/h3&gt;

&lt;p&gt;Here are a few example prompts and command-line inputs to experiment with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python main.py 
     --prompt "With increased complexity should we relook proliferation of Microservice and build Modular Monoliths" 
     --rounds 5 
     --personas-file './input/microservice-personas.json' 
     --output html 
     --save-to "./output/microservice-discussion.html"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczms2pad0ixm4qchyia9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczms2pad0ixm4qchyia9.png" alt="Screen copy of output html" width="800" height="401"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python main.py --prompt "Can a specialized AI or AGI replace primary care physicians" --rounds 20 --personas-file './input/pcp-personas.json' --output html --save-to "./output/pcp-discussion.html"

python main.py 
     --prompt "Is AI gonna replace primary care physicians" 
     --rounds 8 
     --personas-file './input/pcp-personas.json'
     --output html 
     --save-to "./output/pcp-discussion.html"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hrwv0gxp77eln8g6rwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hrwv0gxp77eln8g6rwl.png" alt="Screen copy of output html" width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python main.py 
     --prompt "Which is the good front end technology to develop web applications" 
     --rounds 25 
     -personas-file './input/frontend-personas.json' 
     --output html 
     --save-to "./output/discussion.html"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0i8ys937d1fxbkzdzjip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0i8ys937d1fxbkzdzjip.png" alt="Screen copy of output html" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧎‍♂️ Why Tree-of-Thought?
&lt;/h3&gt;

&lt;p&gt;LLMs are great at linear reasoning, but sometimes, ideas need branches, not just steps. It’s less about “right answers,” more about expanding thought space. This approach enables agents to diverge in their thinking, reflect on different possibilities, and build upon each other's ideas, with the primary focus being on expanding the thought space rather than solely seeking a single "right answer".&lt;/p&gt;

&lt;p&gt;This CLI is a simple inspiration, not a full-fledged ToT that implements path optimization or scoring. Perhaps in the future, it could.&lt;/p&gt;




&lt;h3&gt;
  
  
  🤖 Where This Fits: RAG, Agentic RAG, and CAG
&lt;/h3&gt;

&lt;p&gt;If you’ve been following the evolution of LLM architecture, you’ll recognize these three models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RAG (Retrieval-Augmented Generation): Adds external knowledge to LLMs.&lt;/li&gt;
&lt;li&gt;Agentic RAG: Enables LLMs to delegate tasks to autonomous agents (e.g., web search, coding).&lt;/li&gt;
&lt;li&gt;CAG (Cache-Augmented Generation): Optimizes for speed by caching memory instead of retrieving it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This CLI sits squarely as a collaborative multi-agent conversational tool. It doesn’t fetch external data, but it orchestrates reasoning. Each agent is a simulated persona, capable of reflecting, responding, and evolving the conversation.&lt;/p&gt;




&lt;h3&gt;
  
  
  🌱 What’s Next?
&lt;/h3&gt;

&lt;p&gt;This CLI is just a start. I’m toying with ideas like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrating OpenAI tools to let each agent choose its own approach—whether that means browsing the web for real-time data, executing code snippets, reflecting quietly on prior context, or invoking APIs. This modularity opens the door to more flexible decision-making pathways where agents can act autonomously based on the task at hand. Frameworks like LangChain, CrewAI, or AutoGPT can be used to orchestrate these multi-agent workflows, where each agent has a set of tools and reasoning capabilities and can decide which to invoke depending on its role and context. For instance, one agent might fact-check a statement using retrieval tools powered by LangChain, while another writes simulation code, and a third prompts itself with counterfactuals for deeper reflection. CrewAI can be especially useful when simulating structured teams, while AutoGPT lends itself to more open-ended exploration.&lt;/li&gt;
&lt;li&gt;Assigning voting power or influence to different personas—where each agent's opinion can carry a weight based on their domain authority, confidence level, or even engagement score. This allows the system to resolve disagreement in a structured way, such as weighted consensus, probabilistic sampling, or majority opinion. For example, an actuarial persona might be granted higher voting weight in pricing discussions, while a customer advocate might have more say in usability debates.&lt;/li&gt;
&lt;li&gt;Implementing Agentic RAG and CAG options—where agents can dynamically retrieve data or leverage cached memory to balance responsiveness with accuracy, opening the door for adaptive workflows like delegated web searches or instant responses based on frequently accessed context.&lt;/li&gt;
&lt;li&gt;Assigning a goal for the agents, such as reaching consensus, challenging assumptions, ranking solutions, or role-playing stakeholder positions can dramatically shift how they interact and contribute. For example, a debate-style goal encourages conflict and contrast, while a synthesis goal prioritizes convergence. These behavioral nudges can help simulate more realistic human-like collaboration or disagreement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bringing this into the insurance domain, here are some business use cases that could benefit from multi-agent reasoning and simulation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Underwriting: Simulating multi-underwriter collaboration in property insurance scenarios, an Agentic RAG example where each underwriter agent brings a different lens to evaluating the same risk. For instance, one agent may specialize in structural risk, another in climate exposure, and another in occupancy or usage-based data. These agents could debate, validate, or challenge each other’s views asynchronously, ultimately helping the human underwriter synthesize a more holistic decision.&lt;/li&gt;
&lt;li&gt;Claims: where agents represent medical experts, policy terms, and historical precedent to triage a complex case. Each agent can provide input based on its specialization like, medical necessity, coverage interpretation, or comparative case history and the system can surface areas of alignment or contention. The result might be a collaborative decision summary, a weighted score, or even a generated explanation suitable for review or audit.&lt;/li&gt;
&lt;li&gt;Fraud detection: where multiple perspectives evaluate anomalies in claim data or customer behavior. Vector embeddings can significantly enhance this use case by enabling similarity searches across high-dimensional claim histories, customer behavior, or provider patterns. Each agent can retrieve semantically similar past cases using vector embeddings, offering comparative reasoning. Combined with RAG, the agents can pull in structured anomaly flags, historical fraud investigations, and contextual metadata to enrich their evaluations, making the simulation both data-aware and behaviorally diverse.&lt;/li&gt;
&lt;li&gt;Product design: where marketing, actuarial, and distribution personas simulate how a new coverage option might perform or be perceived. By combining Agentic RAG and Tree-of-Thought prompting, these personas can retrieve relevant market data, historical uptake metrics, and regulatory constraints to shape their opinions. The simulation can branch into competing strategies, for example, a low-premium, high-volume plan versus a niche, high-margin variant, and converge through deliberation or voting. The result might be a ranked list of product ideas, a synthesized go-to-market narrative, or an early warning about friction points across departments.&lt;/li&gt;
&lt;li&gt;Customer service: where empathy agents, compliance agents, and procedural agents work together to craft responses that are both kind and accurate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But mostly, I wanted to share a tiny, runnable proof‑of‑concept—something that shows how easy it is to spark new ideas once your LLMs are in conversation, not isolation.&lt;/p&gt;

&lt;p&gt;In the following Part 2 installment we evolve this CLI into a goal driven ToT engine, add RAG powered by vector embeddings, benchmark different agent roles, and walk through two real‑world scenarios, insurance underwriting and care‑management, to demonstrate how the tool can be used in business context.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>rag</category>
      <category>agenticai</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
