Skip to content

Update: [AEA-6157] - Exceed Context Window Issue#394

Merged
kieran-wilkinson-4 merged 29 commits intomainfrom
AEA-6157-Exceed-Context-Window-Limit
Feb 19, 2026
Merged

Update: [AEA-6157] - Exceed Context Window Issue#394
kieran-wilkinson-4 merged 29 commits intomainfrom
AEA-6157-Exceed-Context-Window-Limit

Conversation

@kieran-wilkinson-4
Copy link
Copy Markdown
Contributor

@kieran-wilkinson-4 kieran-wilkinson-4 commented Feb 19, 2026

Summary

Updates the bot to use Prompt Reformulation and Fixed Size Chunking

Details

  1. Slack messages filter through a "Reformulation" prompt before reaching the RAG
    • Looks for questions within the user's query
    • Finds sub-questions and important details
    • Searching knowledgebase to improve search query inc. key words, abbreviations, etc
  2. Use Fixed Size Chunking to reduce risk of exceeding context window
    • Set chunk sizes lets us control the size of the documents pulled back for RAG
    • Can customise size/ overlap allowing for fine-tuning, between comprehension and hallucination, at a later date.

@github-actions
Copy link
Copy Markdown
Contributor

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-6157

@kieran-wilkinson-4 kieran-wilkinson-4 enabled auto-merge (squash) February 19, 2026 15:34
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (non-blocking): if we are thinking about re-enabling citations in the future, would it make sense to just comment out these tests instead of removing them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, these were removed due to duplication.

I realised I was breaking in-line references/ links because I was creating a bullet point for each dash.
This wasn't always the case as we'd get things like `NHS - Something Something", which do not need a new line 😅

When fixing this, these became redundant, and if I removed the new line logic then they matched existing tests.

@kieran-wilkinson-4 kieran-wilkinson-4 merged commit 67503d9 into main Feb 19, 2026
16 checks passed
@kieran-wilkinson-4 kieran-wilkinson-4 deleted the AEA-6157-Exceed-Context-Window-Limit branch February 19, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants