Skip to content

Commit c9b06cb

Browse files
feat: Update system and user prompts
1 parent 1f56e86 commit c9b06cb

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

packages/cdk/prompts/systemPrompt.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,20 @@ IMPORTANT: This is informational guidance only. Always verify against current cl
6969
b. _Italic_ for:
7070
- Citations, references
7171
- Document titles: _Integration Guide v3.2_
72-
c. ```code blocks``` for:
72+
c. Block Quotes for:
7373
- Direct quotes >1 sentence
7474
- Technical specifications, parameters
7575
- Example configurations
76-
d. `inline code` for:
76+
d. `Inline code` for:
7777
- System names, field names: `PrescriptionID`
7878
- Short technical terms: `HL7 FHIR`
7979
e. Links:
8080
- Format: <https://example.com|Descriptive Name>
8181
- Always test readability of link text
8282

8383
7. Bibliography and References
84-
a. In line citations should be proceeded by [cit_{index number}] and use a http link
85-
b. Citations in the [citation] sections should be formatted: <cit>source number|title|link|filename|reference text|</cit>
84+
a. List every source used
85+
b. In line citations should be proceeded by [cit_{index number}] and use a http link
86+
c. Citations in the [Bibliography] section should be formatted: <cit>source number|title|link|filename|reference text|</cit>
8687
- If the link doesn't exist, or the link isn't to a website, enter "none" in the link section
87-
c. Any source used, inline or as a source to generate an answer, should be listed in the Bibliography section
88+
d. Any source used, inline or as a source to generate an answer, should be listed in the Bibliography section
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
<SearchResults>$search_results$</SearchResults>
2-
1. Use "mrkdwn" markup
3-
a._italic_ references
4-
b. *bold* headings
5-
c. ```code```quotes
6-
d. <link|name> hyperlinks
7-
2. Using your knowledge around the National Health Service (NHS), Electronic Prescription Service (EPS) and the Fast Healthcare Interoperability Resources' (FHIR) onboarding, Supplier Conformance Assessment List (SCAL), NHS SPINE, APIs, developer guides and error resolution; please answer the following question:
2+
1. Using your knowledge around the National Health Service (NHS), Electronic Prescription Service (EPS) and the Fast Healthcare Interoperability Resources' (FHIR) onboarding, Supplier Conformance Assessment List (SCAL), NHS SPINE, APIs, developer guides and error resolution; please answer the following question:
83
<UserQuery>{{user_query}}</UserQuery>`
4+
2. *IMPORTANT*: List all sources in a table at end of message

packages/slackBotFunction/app/slack/slack_events.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,7 @@ def _create_feedback_blocks(
197197
)
198198

199199
# Remove any citations that have not been returned
200-
response_text = response_text.replace(
201-
f"[cit_{citation_number}]",
202-
"",
203-
)
200+
response_text = response_text.replace("cit_", "")
204201

205202
# Main body
206203
blocks.append({"type": "section", "text": {"type": "mrkdwn", "text": response_text}})
@@ -620,7 +617,7 @@ def open_citation(channel: str, timestamp: str, message: Any, params: Dict[str,
620617
try:
621618
# Get citation details
622619
title: str = params.get("title", "No title available.")
623-
body: str = params.get("body", "No citation text available.", "No source found")
620+
body: str = params.get("body", "No citation text available.")
624621
link: str = params.get("link", "")
625622

626623
blocks = message.get("blocks", [])

0 commit comments

Comments
 (0)