Skip to content

Conversation

@vvenglaturmsft
Copy link
Contributor

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ X] No

Pull Request Type

What kind of change does this Pull Request introduce?
This is a draft PR for patient context management to ensure patient context is determined and maintained

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Contributor

@matthiasblondeel matthiasblondeel left a comment

Choose a reason for hiding this comment

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

I think my main question is why do we need the PATIENT_CONTEXT_JSON to be sent to the agents

The snapshot is programmatically generated, and agents don't need this information. Could we not get rid of it?

Minimal per-patient context for patient isolation.
"""
patient_id: str
facts: Dict[str, Any] = field(default_factory=dict)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these facts still used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now it is empty {} but the infrastructure is in place for when we add patient specific metadata if required so the agents do not have to re-parse the history. If we dont need we can remove this. I will ask lukas to d othat

└─────────────┬─────────────────────────┘
┌───────────────────────────────────────┐
│ 5. Inject Fresh Snapshot │ ← Add system message
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we still need this ephemeral/patient context for the agents?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is primarily being used for agent grounding. while agents might be able to infer the patient identity through history the ephemeral snapshot ensures immediate and more accurate patient context. It also maintaints the session patients so that multiple use cases can be addressed. I will ask lukas to try without it but i think it might fail a few use cases. But we can definitely check it out

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