Skip to content

Add answer prefilling for job_chat documentation search queries#394

Open
hanna-paasivirta wants to merge 4 commits intomainfrom
json-markdown-prompt
Open

Add answer prefilling for job_chat documentation search queries#394
hanna-paasivirta wants to merge 4 commits intomainfrom
json-markdown-prompt

Conversation

@hanna-paasivirta
Copy link
Contributor

Short Description

Adds answer pre-filling to LLM documentation searches, to fix an issue where the model can include markdown before JSON. Also tweaks the prompt slightly for good measure, to make the answer more probable for the model, and adds a test for the query generation part of the service.

The error on Sentry:

Failed to parse LLM response as JSON: Expecting value: line 1 column 1 (char 0). Response text: ```json
[
  {"query": "dhis2 get data elements metadata", "doc_type": "adaptor_docs"},
  {"query": "dhis2 api endpoints list all data elements", "doc_type": "adaptor_docs"}
]

Fixes #387 . We already pre-fill other parts of the chat services that require structured outputs.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

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.

Sentry: Error retrieving knowledge

1 participant

Comments