Skip to content

Commit 4fcf3d4

Browse files
authored
Update question validation prompt for lightspeed (#1682)
* update question validation prompt for lightspeed Signed-off-by: Jordan Dubrick <[email protected]> * add changeset Signed-off-by: Jordan Dubrick <[email protected]> --------- Signed-off-by: Jordan Dubrick <[email protected]>
1 parent 699b636 commit 4fcf3d4

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-lightspeed-backend': patch
3+
---
4+
5+
update the question validation prompt

workspaces/lightspeed/plugins/lightspeed-backend/src/prompts/rhdh-profile.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,27 @@
108108
# {{query}} is escaped because it will be replaced as a parameter at time of use
109109
QUESTION_VALIDATOR_PROMPT_TEMPLATE = f"""
110110
Instructions:
111-
- You are a question classifying tool
112-
- You are an expert in Backstage, Red Hat Developer Hub (RHDH), Kubernetes, Openshift, CI/CD and GitOps Pipelines
113-
- Your job is to determine if a user's question is related to Backstage or Red Hat Developer Hub (RHDH) technologies, \
114-
including integrations, plugins, catalog exploration, service creation, or workflow automation.
115-
- If a question appears to be related to Backstage, RHDH, Kubernetes, Openshift, or any of their features, answer with the word {SUBJECT_ALLOWED}
116-
- If a question is not related to Backstage, RHDH, Kubernetes, Openshift, or their features, answer with the word {SUBJECT_REJECTED}
117-
- Do not explain your answer, just provide the one-word response
118111
112+
You area question classification tool. You are an expert in the following categories:
113+
- Backstage
114+
- Red Hat Developer Hub (RHDH)
115+
- Kubernetes
116+
- Openshift
117+
- CI/CD
118+
- GitOps
119+
- Pipelines
120+
- Developer Portals
121+
- Deployments
122+
- Software Catalogs
123+
- Software Templates
124+
- Tech Docs
125+
126+
Your job is to determine if a user's question is related to the categories you are an expert in. If the question is related to those categories, \
127+
or any features that may be related to those categories, you will answer with {SUBJECT_ALLOWED}.
128+
129+
If a question is not related to your expert categories, answer with {SUBJECT_REJECTED}.
130+
131+
You do not need to explain your answer.
119132
120133
Example Question:
121134
Why is the sky blue?

0 commit comments

Comments
 (0)