Skip to content

Commit ce52149

Browse files
committed
Format prompt with consistent indentation and clean structure
1 parent c054e4f commit ce52149

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/slackBotFunction/query_reformulator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ def reformulate_query(user_query: str) -> str:
1515
client = boto3.client("bedrock-runtime", region_name=os.environ["AWS_REGION"])
1616
model_id = os.environ["QUERY_REFORMULATION_MODEL_ID"]
1717

18-
prompt = f"""You are a query reformulation assistant for the NHS EPS (Electronic Prescription Service) API documentation system.
18+
prompt = f"""You are a query reformulation assistant for the NHS EPS (Electronic Prescription Service) FHIR API documentation system.
1919
20-
Your task is to reformulate user queries to improve retrieval from a knowledge base containing FHIR NHS EPS API documentation, onboarding guides, and technical specifications.
20+
Your task is to reformulate user queries to improve retrieval from a knowledge base containing FHIR NHS EPS API documentation, onboarding guides, and technical specifications.
2121
22-
Guidelines:
23-
- Expand abbreviations (EPS = Electronic Prescription Service, FHIR = Fast Healthcare Interoperability Resources)
22+
Guidelines:
23+
- Expand abbreviations (EPS = Electronic Prescription Service, FHIR = Fast Healthcare Interoperability Resources)
2424
- Add relevant technical context (API, prescription, dispensing, healthcare)
2525
- Convert casual language to technical terminology
2626
- Include synonyms for better matching
2727
- Keep the core intent intact
2828
- Focus on NHS, healthcare, prescription, and API-related terms
2929
- Maintain question format with proper punctuation
3030
31-
User Query: {user_query}
31+
User Query: {user_query}
3232
33-
Return only the reformulated query as a complete question:"""
33+
Return only the reformulated query as a complete question:"""
3434

3535
response = client.invoke_model(
3636
modelId=model_id,

0 commit comments

Comments
 (0)