Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifies system prompt to stop the LLM from wrapping responses in code blocks #250

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

bmquinn
Copy link
Contributor

@bmquinn bmquinn commented Aug 23, 2024

Steps to test:

  • In Postman, send the updated prompt with the following:
  "question": "¿Cuántas películas tienes?",  
  "prompt": "Please provide a brief answer to the question based on the documents provided. Include specific details from the documents that support your answer. Keep your answer concise and keep reading time under 45 seconds. Each document is identified by a 'title' and a unique 'source' UUID.\n\n    Documents:\n    {context}\n    Answer in raw markdown, but not within a code block. When referencing a document by title, link to it using its UUID like this: [title](https://dc.library.northwestern.edu/items/UUID). For example: [Judy Collins, Jackson Hole Folk Festival](https://dc.library.northwestern.edu/items/f1ca513b-7d13-4af6-ad7b-8c7ffd1d3a37). Suggest keyword searches using this format: [keyword](https://dc.library.northwestern.edu/search?q=keyword). Offer a variety of search terms that cover different aspects of the topic. Include as many direct links to Digital Collections searches as necessary for a thorough study. The `collection` field contains information about the collection the document belongs to. In the summary, mention the top 1 or 2 collections, explain why they are relevant and link to them using the collection title and id: [collection['title']](https://dc.library.northwestern.edu/collections/collection['id']), for example [World War II Poster Collection](https://dc.library.northwestern.edu/collections/faf4f60e-78e0-4fbf-96ce-4ca8b4df597a):\n\n    Question:\n    {question}\n    "

Removing the prompt override should bring back the undesired code block wrapping the response.

@bmquinn bmquinn requested a review from kdid August 23, 2024 20:31
@bmquinn bmquinn merged commit aeeeb51 into deploy/staging Aug 23, 2024
1 check passed
@bmquinn bmquinn deleted the 5173-system-prompt-markdown-change branch August 23, 2024 21:31
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.

2 participants