Skip to content

fix: add space after # in CMR CARE agent markdown headings#40

Merged
sanzog03 merged 1 commit intodevelopfrom
fix/cmr-care-markdown-heading
Mar 17, 2026
Merged

fix: add space after # in CMR CARE agent markdown headings#40
sanzog03 merged 1 commit intodevelopfrom
fix/cmr-care-markdown-heading

Conversation

@rohit-sahoo
Copy link
Copy Markdown
Collaborator

Issue:
Bug Ticket: Agent chat streams malformed markdown heading syntax

What changes I have made:

  • Added explicit markdown formatting instruction to the CMR CARE agent system prompt in akd_ext/agents/cmr_care.py. The instruction tells the LLM to always include a space after # characters in headings

How to test:

  • Set OPENAI_API_KEY in .env
  • Uncomment test_cmr_care_agent_markdown_heading_format in tests/agents/test_cmr_care.py
  • Run below command:
uv run pytest "tests/agents/test_cmr_care.py::test_cmr_care_agent[Find datasets related to sea surface temperature in the Pacific Ocean]" -s -o "addopts="

(above test simply ignores the default pytest flags from config and simply runs this single test)

  • Optionally uncomment test_cmr_care_agent_markdown_heading_format in test_cmr_care.py to run the automated regex check

@rohit-sahoo rohit-sahoo self-assigned this Mar 16, 2026
assert len(result.dataset_concept_ids) > 0


# To test the markdown heading format, uncomment the following test function and run the test
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why is it commented out?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I assumed we have a CI setup in this repo and the test needs OPEN_AI_API_KEY to run the test, so I commented it out, but there are no CI set up here.

@rohit-sahoo rohit-sahoo requested a review from sanzog03 March 16, 2026 20:20
@sanzog03 sanzog03 merged commit a31362a into develop Mar 17, 2026
@rohit-sahoo rohit-sahoo deleted the fix/cmr-care-markdown-heading branch April 9, 2026 16:01
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