Spaces:
Running
Running
Commit ·
79d1384
1
Parent(s): 8de2350
Add BASE_PROMPT: self-contained responses, no speculation
Browse filesMinimal base prompt for the explorer — no persona, just quality
and guardrails.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
app.py
CHANGED
|
@@ -41,6 +41,12 @@ HF_TOKEN = os.environ.get("HF_TOKEN", "")
|
|
| 41 |
|
| 42 |
SOURCE = "prod" if os.environ.get("SPACE_ID") else "dev"
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
hf_api = HfApi(token=HF_TOKEN) if HF_TOKEN else None
|
| 45 |
|
| 46 |
|
|
@@ -176,7 +182,7 @@ def stream_question(
|
|
| 176 |
scratch_path = tempfile.mkdtemp(prefix="lh-scratch-")
|
| 177 |
scratch_dir = Path(scratch_path)
|
| 178 |
|
| 179 |
-
system_prompt = build_system_prompt(base_prompt=
|
| 180 |
messages: list[Message] = [
|
| 181 |
{"role": "system", "content": system_prompt},
|
| 182 |
{"role": "user", "content": question},
|
|
|
|
| 41 |
|
| 42 |
SOURCE = "prod" if os.environ.get("SPACE_ID") else "dev"
|
| 43 |
|
| 44 |
+
BASE_PROMPT = (
|
| 45 |
+
"Your response should stand on its own.\n\n"
|
| 46 |
+
"Do not speculate, manufacture connections to make a question fit, or answer "
|
| 47 |
+
"off-topic questions."
|
| 48 |
+
)
|
| 49 |
+
|
| 50 |
hf_api = HfApi(token=HF_TOKEN) if HF_TOKEN else None
|
| 51 |
|
| 52 |
|
|
|
|
| 182 |
scratch_path = tempfile.mkdtemp(prefix="lh-scratch-")
|
| 183 |
scratch_dir = Path(scratch_path)
|
| 184 |
|
| 185 |
+
system_prompt = build_system_prompt(base_prompt=BASE_PROMPT, workspace=workspace)
|
| 186 |
messages: list[Message] = [
|
| 187 |
{"role": "system", "content": system_prompt},
|
| 188 |
{"role": "user", "content": question},
|