Skip to content

Commit

Permalink
Explicitly informing the model not include uneccessary reponses sections
Browse files Browse the repository at this point in the history
in its output. This is done because some models like llama2 provide
sections such as "Explanation:" or "Justification:" after the JSON
response.
This is not a surefire fix though. The model (llama2) will still
includes explanation and justification sections at times despite this
explicit instruction in the prompt
  • Loading branch information
brPreetham committed Apr 8, 2024
1 parent eb09e2a commit ea40769
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/agents/researcher/prompt.jinja2
Expand Up @@ -18,6 +18,7 @@ Only respond in the following JSON format:
"ask_user": "<ASK INPUT FROM USER>"
}
```
Strictly do not add any other extra sections of information in your response apart from the JSON format mentioned above.

Keywords for Search Query: {{ contextual_keywords }}

Expand Down

1 comment on commit ea40769

@brPreetham
Copy link
Author

Choose a reason for hiding this comment

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

This is a fix for the issue : Not working with LLM #396 . It will not work 100% of the time though but it is certainly an improvement.

Please sign in to comment.