<?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>Forem: Manasa Nandelli</title>
    <description>The latest articles on Forem by Manasa Nandelli (@manasa_nandelli_707b6d6f2).</description>
    <link>https://forem.com/manasa_nandelli_707b6d6f2</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%2F3666020%2Fc0b62426-feed-4cfa-8e9f-247d079679e7.jpg</url>
      <title>Forem: Manasa Nandelli</title>
      <link>https://forem.com/manasa_nandelli_707b6d6f2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/manasa_nandelli_707b6d6f2"/>
    <language>en</language>
    <item>
      <title>RAG-Augmented Agile Story Generation: An Architectural Framework for LLM-Powered Backlog Automation</title>
      <dc:creator>Manasa Nandelli</dc:creator>
      <pubDate>Wed, 17 Dec 2025 03:49:27 +0000</pubDate>
      <link>https://forem.com/manasa_nandelli_707b6d6f2/rag-augmented-agile-story-generation-an-architectural-framework-for-llm-powered-backlog-automation-2md0</link>
      <guid>https://forem.com/manasa_nandelli_707b6d6f2/rag-augmented-agile-story-generation-an-architectural-framework-for-llm-powered-backlog-automation-2md0</guid>
      <description>&lt;p&gt;&lt;strong&gt;# RAG-Augmented Agile Story Generation: How I Built an AI System to Auto-Generate User Stories from Epics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;** Author : Manasa Nandelli&lt;/p&gt;

&lt;p&gt;As a software engineer working on enterprise applications, I spent countless hours translating high-level epics into actionable user stories. The process was repetitive, time-consuming, and—let's be honest—inconsistent depending on my caffeine levels that day.&lt;/p&gt;

&lt;p&gt;So I decided to build something about it.&lt;/p&gt;

&lt;p&gt;This article shares the architectural framework I developed for &lt;strong&gt;automated user story generation&lt;/strong&gt; using Retrieval-Augmented Generation (RAG). I'll walk you through the design decisions, the pitfalls I encountered, and what I learned along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I built a RAG pipeline that generates user stories from project epics&lt;/li&gt;
&lt;li&gt;It retrieves organizational knowledge (story rules, product docs) from a vector database&lt;/li&gt;
&lt;li&gt;The LLM receives this context and produces format-compliant, domain-accurate stories&lt;/li&gt;
&lt;li&gt;Key insight: Combining human Agile expertise with AI capabilities beats either approach alone&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Problem I Was Trying to Solve
&lt;/h2&gt;

&lt;p&gt;Every sprint planning, I faced the same challenge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Product owner creates an epic&lt;/strong&gt;: "Implement user notification preferences"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I need to break it into stories&lt;/strong&gt;: But how many? What format? What acceptance criteria?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I dig through documentation&lt;/strong&gt;: What does our system currently support? What's the terminology?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I write stories&lt;/strong&gt;: Trying to remember our team's format standards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review reveals issues&lt;/strong&gt;: "This story is too big," "Missing acceptance criteria," "Wrong labels"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The pain points were clear:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Challenge&lt;/th&gt;
&lt;th&gt;Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Inconsistency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;My stories looked different from my teammates' stories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Knowledge silos&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Domain expertise lived in my head, not accessible to AI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time sink&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;30+ minutes per epic just for initial story drafts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Context switching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Constantly jumping between docs, JIRA, and my notes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Insight: What If AI Had Access to Our Organizational Knowledge?
&lt;/h2&gt;

&lt;p&gt;I'd experimented with asking ChatGPT to generate user stories. The results were... okay. Generic. They followed a reasonable format but lacked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our specific terminology&lt;/li&gt;
&lt;li&gt;Our sizing guidelines&lt;/li&gt;
&lt;li&gt;Our acceptance criteria format&lt;/li&gt;
&lt;li&gt;Knowledge of what our product actually does&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then it hit me: &lt;strong&gt;The AI isn't bad at generating stories—it just doesn't know what I know.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What if I could give it access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our story creation rules and guidelines&lt;/li&gt;
&lt;li&gt;Our story splitting techniques&lt;/li&gt;
&lt;li&gt;Our product documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's when I discovered Retrieval-Augmented Generation (RAG).&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture I Built
&lt;/h2&gt;

&lt;p&gt;Here's the high-level system I designed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────────────┐
│                    KNOWLEDGE INGESTION (One-Time Setup)                     │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  📄 Source Documents    →    📝 Text Extraction    →    🔢 Embeddings       │
│  (Rules, Guidelines,         (Chunking with            (Vector              │
│   Product Docs)               Overlap)                  Representations)    │
│                                                              │              │
│                                                              ▼              │
│                                                         🗄️ Vector DB       │
│                                                                             │
├─────────────────────────────────────────────────────────────────────────────┤
│                    STORY GENERATION (Runtime)                               │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                              │              │
│  📋 Epic Intake    →    🔍 Module Detection    →    🎯 Semantic Query ──────┘
│  (From Issue                (Classify epic            (Retrieve relevant     
│   Tracker)                   by domain)                context)              
│                                                              │              │
│                                                              ▼              │
│                         📝 Prompt Assembly    →    🤖 LLM Generation        │
│                         (Inject retrieved          (Produce stories)        │
│                          context)                                           │
│                                                              │              │
│                                                              ▼              │
│                                                         ✅ Output Stories   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let me break down each component.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 1: Building the Knowledge Base
&lt;/h2&gt;

&lt;p&gt;Before the AI could generate good stories, I needed to give it the right knowledge. I identified three categories of documents to ingest:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Story Creation Rules
&lt;/h3&gt;

&lt;p&gt;These are the organizational standards I'd been carrying in my head:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Format requirements&lt;/strong&gt;: "As a [role], I want [feature], so that [benefit]"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acceptance criteria template&lt;/strong&gt;: Given-When-Then format&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sizing guidelines&lt;/strong&gt;: What constitutes a 1-point vs 5-point story&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Required metadata&lt;/strong&gt;: Labels, components, definition of done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anti-patterns&lt;/strong&gt;: Things to avoid (stories without acceptance criteria, compound features, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Story Splitting Techniques
&lt;/h3&gt;

&lt;p&gt;Over time, I'd developed mental models for breaking down large stories. I formalized these into nine distinct techniques:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;When to Apply&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Split by Role&lt;/td&gt;
&lt;td&gt;Multiple user types involved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Workflow&lt;/td&gt;
&lt;td&gt;Multiple user journeys embedded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Data Variation&lt;/td&gt;
&lt;td&gt;Multiple data types/categories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Data Entry&lt;/td&gt;
&lt;td&gt;Multiple fields listed with "and/or"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Complexity&lt;/td&gt;
&lt;td&gt;Multiple integrations required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Platform&lt;/td&gt;
&lt;td&gt;Multiple devices/browsers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by Business Rules&lt;/td&gt;
&lt;td&gt;Conditional logic present&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by CRUD&lt;/td&gt;
&lt;td&gt;Data lifecycle management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split by BDD Scenarios&lt;/td&gt;
&lt;td&gt;Multiple acceptance test scenarios&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;I wrote a companion article diving deep into these nine techniques: Encoding Agile Expertise: Nine Heuristics for Story Decomposition&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Product Documentation
&lt;/h3&gt;

&lt;p&gt;I ingested relevant product documentation so the AI would understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What features actually exist&lt;/li&gt;
&lt;li&gt;Correct terminology&lt;/li&gt;
&lt;li&gt;Domain-specific concepts&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔧 Part 2: The Ingestion Pipeline
&lt;/h2&gt;

&lt;p&gt;Here's how I processed documents into the vector database:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Text Extraction
&lt;/h3&gt;

&lt;p&gt;I extracted text from various formats (markdown, PDF). The key challenge with PDFs was ensuring text was selectable, not scanned images.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Chunking Strategy
&lt;/h3&gt;

&lt;p&gt;This was one of the most important decisions. I experimented with different approaches:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Chunk Size&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;200 chars&lt;/td&gt;
&lt;td&gt;Too fragmented—lost context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2000 chars&lt;/td&gt;
&lt;td&gt;Too large—included irrelevant content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;800 chars&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sweet spot—1-2 paragraphs of coherent content&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I also added &lt;strong&gt;150-character overlap&lt;/strong&gt; between chunks. This prevents sentences from being cut off mid-thought and ensures important context isn't lost at boundaries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document: "The calendar module lets you schedule events. Events can be recurring..."
                                                    ↓
Chunk 1: "The calendar module lets you schedule events. Events can be recurring or..."
Chunk 2: "Events can be recurring or one-time. You can invite attendees..."
         ↑ Overlap ensures continuity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Embedding Generation
&lt;/h3&gt;

&lt;p&gt;Each chunk gets converted into a vector (a list of 1536 numbers) that represents its semantic meaning. Similar concepts produce similar vectors—even without matching keywords.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Vector Storage with Metadata
&lt;/h3&gt;

&lt;p&gt;Each vector is stored with metadata enabling filtered queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vector Entry:
├── ID: "rules_chunk_0"
├── Values: [0.023, -0.156, 0.892, ... 1536 numbers]
└── Metadata:
    ├── documentType: "rules"
    ├── category: "splitting_techniques"
    └── title: "Story Splitting Guide"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This metadata is crucial—it lets me query specifically for rules vs. documentation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 3: The Query Strategy
&lt;/h2&gt;

&lt;p&gt;When an epic comes in, I don't just do one vector search. I developed a &lt;strong&gt;dual-query strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Query 1: Always Retrieve Rules
&lt;/h3&gt;

&lt;p&gt;No matter what the epic is about, I always fetch story creation rules and splitting techniques. This ensures consistent format compliance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filter: documentType = "rules"
Top K: 5 chunks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Query 2: Retrieve Domain-Specific Documentation
&lt;/h3&gt;

&lt;p&gt;Based on the epic content, I detect the relevant product domain and fetch documentation specific to that area.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filter: documentType = "documentation" AND domain = [detected_domain]
Top K: 5 chunks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why Two Queries?
&lt;/h3&gt;

&lt;p&gt;Initially, I tried a single query combining everything. The problem: documentation chunks often ranked higher than rules (they're longer and more detailed), pushing critical formatting rules out of the top results.&lt;/p&gt;

&lt;p&gt;Separating the queries ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Rules are always present (format compliance)&lt;/li&gt;
&lt;li&gt;✅ Documentation is contextually relevant (domain accuracy)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Part 4: Prompt Engineering
&lt;/h2&gt;

&lt;p&gt;With retrieved context in hand, I assemble the prompt. Here's the structure I developed:&lt;/p&gt;

&lt;h3&gt;
  
  
  System Prompt (Static)
&lt;/h3&gt;

&lt;p&gt;This establishes the AI's role and injects the rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are an expert Agile story creator.

## STORY CREATION RULES (You MUST follow these):
[Retrieved rules chunks]

## STORY SPLITTING TECHNIQUES:
[Retrieved splitting techniques]

## DOMAIN CONTEXT:
[Retrieved documentation chunks]

## OUTPUT FORMAT:
For each story, provide:
1. Story Title: "As a [role], I want [feature], so that [benefit]"
2. Description: Brief explanation
3. Acceptance Criteria: Given-When-Then format
4. Story Points: 1, 2, 3, 5, or 8
5. Labels: Appropriate categorization

## IMPORTANT:
- Each story should be independently deliverable
- Stories should be 1-8 points (split larger ones)
- Don't duplicate existing linked issues
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  User Prompt (Dynamic)
&lt;/h3&gt;

&lt;p&gt;This contains the specific epic to process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create user stories for this epic:

## EPIC SUMMARY:
[Epic title]

## EPIC DESCRIPTION:
[Epic details]

## EXISTING RELATED ISSUES (DO NOT DUPLICATE):
[List of already-created stories]

Please generate 3-7 well-structured user stories.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Prompt Engineering Lessons
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Explicit format specification&lt;/strong&gt;: The AI follows formats better when they're clearly defined&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Negative examples&lt;/strong&gt;: Telling the AI what NOT to do is as important as what to do&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context labeling&lt;/strong&gt;: Clear section headers ("RULES", "CONTEXT") help the AI understand what's what&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emphasis markers&lt;/strong&gt;: "You MUST follow these" increases adherence&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Results and Observations
&lt;/h2&gt;

&lt;p&gt;After deploying this system, here's what I observed:&lt;/p&gt;

&lt;h3&gt;
  
  
  What Worked Well
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Time to first draft&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From ~30 min to &amp;lt;2 min&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Format consistency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stories consistently followed our template&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Domain terminology&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Correct product terms used&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Splitting suggestions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Large epics got appropriate decomposition recommendations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Challenges I Encountered
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Over-splitting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes the AI would split too aggressively, creating 10+ tiny stories from a simple epic. I addressed this by adding guidance about minimum story scope.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Chunk boundary issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Occasionally, a technique description would get split awkwardly across chunks, leading to incomplete retrieval. The overlap helps, but it's not perfect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Domain edge cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some epics touched multiple domains or didn't fit neatly into categories. I added a "general" fallback that retrieves broadly applicable documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Human review still necessary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The generated stories are good starting points, but still require human review and refinement. I think of them as "80% drafts" that save significant time but aren't fire-and-forget.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;After building and iterating on this system, here's what I learned:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. RAG Beats Pure Prompting
&lt;/h3&gt;

&lt;p&gt;Trying to put all organizational knowledge directly into prompts doesn't scale. RAG lets you maintain a living knowledge base that grows with your organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Chunking Strategy Matters More Than You Think
&lt;/h3&gt;

&lt;p&gt;My initial chunks were too small. The sweet spot for my use case was 800 characters with overlap. Your mileage may vary—experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dual-Query Ensures Consistency
&lt;/h3&gt;

&lt;p&gt;Separating "always needed" content (rules) from "contextually needed" content (documentation) prevents important guidance from being displaced.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Encode Tacit Knowledge
&lt;/h3&gt;

&lt;p&gt;The most valuable part of this project was forcing myself to document what I "just knew" about story creation. That documentation now helps humans AND AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. AI Augments, Doesn't Replace
&lt;/h3&gt;

&lt;p&gt;The system produces quality first drafts that save significant time, but human judgment remains essential for final acceptance.&lt;/p&gt;




&lt;h2&gt;
  
  
  If You Want to Build Something Similar
&lt;/h2&gt;

&lt;p&gt;Here's a high-level roadmap:&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: Document Your Knowledge
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Write down your story format requirements&lt;/li&gt;
&lt;li&gt;Document your splitting techniques (or use/adapt mine)&lt;/li&gt;
&lt;li&gt;Gather relevant product documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 2: Set Up Vector Storage
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Choose a vector database (Pinecone, Weaviate, Supabase pgvector)&lt;/li&gt;
&lt;li&gt;Design your metadata schema&lt;/li&gt;
&lt;li&gt;Implement the ingestion pipeline&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 3: Build the Query Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Implement domain detection&lt;/li&gt;
&lt;li&gt;Set up dual-query retrieval&lt;/li&gt;
&lt;li&gt;Test retrieval quality&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 4: Develop the Generation Pipeline
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Design your prompt template&lt;/li&gt;
&lt;li&gt;Connect to an LLM API&lt;/li&gt;
&lt;li&gt;Implement output parsing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 5: Integrate and Iterate
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Connect to your issue tracker&lt;/li&gt;
&lt;li&gt;Gather feedback&lt;/li&gt;
&lt;li&gt;Refine prompts and rules based on output quality&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;I'm continuing to iterate on this system. Areas I'm exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic story creation&lt;/strong&gt;: Moving from "draft as comment" to direct issue creation with approval workflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback learning&lt;/strong&gt;: Using acceptance/rejection signals to improve generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-epic awareness&lt;/strong&gt;: Considering relationships between epics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimation calibration&lt;/strong&gt;: Learning team-specific sizing patterns from historical data&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Building this system taught me that the future of AI in software engineering isn't about replacing human judgment—it's about augmenting it. By encoding organizational knowledge into retrievable format and combining it with LLM generation capabilities, I created a tool that saves significant time while maintaining quality.&lt;/p&gt;

&lt;p&gt;The architecture patterns I've shared here are transferable across domains. Whether you're generating stories, documentation, test cases, or other structured content, the RAG approach of "retrieve relevant context, then generate" is powerful.&lt;/p&gt;

&lt;p&gt;If you found this useful, check out my companion article on the nine story splitting techniques—it's the "human expertise" half of this human+AI equation.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Have questions or built something similar? Drop a comment below—I'd love to hear about your experience!&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow me for more articles on AI-augmented software engineering workflows.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 Further Reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Encoding Agile Expertise: Nine Heuristics for Story Decomposition - My deep dive into the story splitting techniques&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://arxiv.org/abs/2005.11401" rel="noopener noreferrer"&gt;Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks&lt;/a&gt; - The foundational RAG paper&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mountaingoatsoftware.com/books/user-stories-applied" rel="noopener noreferrer"&gt;User Stories Applied&lt;/a&gt; - Mike Cohn's classic on user stories&lt;/li&gt;
&lt;/ul&gt;

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