Skip to content

feat: add context memory to reuse outputs across modules#176

Open
AnkithaMadhyastha wants to merge 5 commits intoSharanyaAchanta:mainfrom
AnkithaMadhyastha:feature/context-memory
Open

feat: add context memory to reuse outputs across modules#176
AnkithaMadhyastha wants to merge 5 commits intoSharanyaAchanta:mainfrom
AnkithaMadhyastha:feature/context-memory

Conversation

@AnkithaMadhyastha
Copy link
Copy Markdown
Contributor

This PR introduces a lightweight context memory system that allows users to reuse outputs between different modules without manual copy-paste.

Previously, users had to manually transfer text between Mapper, OCR, and Fact Checker, which slowed workflows during multi-step legal analysis. This feature improves usability by enabling seamless data reuse across modules using session state.


✨ Features Added

  • 🧠 Context memory using Streamlit session state

  • 📥 “Use in Fact Checker” button in:

    • IPC → BNS Mapper results
    • OCR extracted text section
  • 🔄 Automatic auto-fill of Fact Checker input when context is available

  • 🧹 Clear context option to reset stored data

  • ⚡ Lightweight implementation with no external storage dependency


Closes #169

@github-actions
Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@centiceron centiceron added the On hold Temporary "on hold" status for maintainence label Feb 27, 2026
@SharanyaAchanta
Copy link
Copy Markdown
Owner

Hey @AnkithaMadhyastha
Regarding this and another PR of yours
There are some merge conflicts because of the recent updates. If you have some time, could you please resolve them according to the current architecture? Since we are approaching the project wrap-up,so we’ll need to wrap this up soon. If you're up for the challenge, go for it! All the best. If not, no worries at all thanks again for your contribution!

Updated the text input to use a default question from session state and added functionality to show and clear context memory.
Added buttons to use and clear context memory in the app.
@AnkithaMadhyastha
Copy link
Copy Markdown
Contributor Author

conflicts resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On hold Temporary "on hold" status for maintainence OSCG26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Context Memory to Reuse Outputs Across Modules

3 participants