Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -248,6 +248,7 @@ with gr.Blocks() as demo:
|
|
| 248 |
],
|
| 249 |
],
|
| 250 |
inputs=[system_prompt_input, prompt_input_detect, response_input, hallucination_status],
|
|
|
|
| 251 |
label="π Click an Example to Auto-Fill (Note: These examples are manually made up to demonstrate specific hallucination types, including parametric interference, and were not generated by an LLM. They serve as synthetic experimental samples.)"
|
| 252 |
)
|
| 253 |
|
|
@@ -285,40 +286,41 @@ with gr.Blocks() as demo:
|
|
| 285 |
# Example 0: Simple Fictional
|
| 286 |
[
|
| 287 |
"Answer strictly based on the provided context.",
|
| 288 |
-
"Context: The planet Zorblax has 3 moons and is made entirely of green cheese.
|
| 289 |
],
|
| 290 |
# Example 1: Parametric Interference (Paris)
|
| 291 |
[
|
| 292 |
"Answer strictly based on the provided context. Do not use outside knowledge.",
|
| 293 |
-
"Context: Due to a recent treaty in 2030, the capital of France was officially moved to Lyon.
|
| 294 |
],
|
| 295 |
# Example 2: Parametric Interference (Pisa)
|
| 296 |
[
|
| 297 |
"Answer strictly based on the provided context.",
|
| 298 |
-
"Context: The Leaning Tower of Pisa is located in Pisa, Italy. It was built in the 12th century.
|
| 299 |
],
|
| 300 |
# Example 3: Difficult Fictional (Conditions)
|
| 301 |
[
|
| 302 |
"Use only the context provided.",
|
| 303 |
-
"Context: The XJ-9000 smartphone features a 6-inch screen, 12 hours of battery life, and is water-resistant up to 2 meters for 30 minutes.
|
| 304 |
],
|
| 305 |
# Example 4: Difficult Fictional (Extrinsic)
|
| 306 |
[
|
| 307 |
"Use only the context provided.",
|
| 308 |
-
"Context: Dr. Aris Thorne discovered the luminescent moss 'Glowleaf' in the caves of Mount Ebon. The moss emits a faint blue light when exposed to moisture.
|
| 309 |
],
|
| 310 |
# Example 5: Long Context with Distractors
|
| 311 |
[
|
| 312 |
"Use only the context provided.",
|
| 313 |
-
"Context: Project Chronos was initiated in 2042 by Apex Dynamics to explore the Mariana Trench using the 'Abyss-1' submersible. The team consisted of 12 marine biologists and 4 engineers. The primary objective was to locate the rare 'Lumina' coral. During the 3-week expedition, they discovered a new species of blind shrimp, but the Lumina coral was not found. A secondary mission, Project Helios, was planned for 2045 to explore the Arctic Ocean. The Abyss-1 submersible suffered minor thruster damage on day 14, forcing the team to rely on backup navigation.
|
| 314 |
],
|
| 315 |
# Example 6: Unanswerable Context with Distractor
|
| 316 |
[
|
| 317 |
"Answer strictly based on the provided context.",
|
| 318 |
-
"Context: The Orion V2 smartwatch features a titanium casing, a heart-rate monitor, and a 4-day battery life. It is available in Silver and Midnight Black. The previous model, Orion V1, included a sleep tracking feature that was highly praised by users.
|
| 319 |
]
|
| 320 |
],
|
| 321 |
inputs=[system_prompt_input_gen, prompt_input_gen],
|
|
|
|
| 322 |
label="π Click an Example to Auto-Fill (Note: These examples are manually made up to demonstrate specific hallucination types, including parametric interference, and were not generated by an LLM. They serve as synthetic experimental samples.)"
|
| 323 |
)
|
| 324 |
|
|
|
|
| 248 |
],
|
| 249 |
],
|
| 250 |
inputs=[system_prompt_input, prompt_input_detect, response_input, hallucination_status],
|
| 251 |
+
examples_per_page=20,
|
| 252 |
label="π Click an Example to Auto-Fill (Note: These examples are manually made up to demonstrate specific hallucination types, including parametric interference, and were not generated by an LLM. They serve as synthetic experimental samples.)"
|
| 253 |
)
|
| 254 |
|
|
|
|
| 286 |
# Example 0: Simple Fictional
|
| 287 |
[
|
| 288 |
"Answer strictly based on the provided context.",
|
| 289 |
+
"Context: The planet Zorblax has 3 moons and is made entirely of green cheese.\n\nQuestion: How many moons does Zorblax have?"
|
| 290 |
],
|
| 291 |
# Example 1: Parametric Interference (Paris)
|
| 292 |
[
|
| 293 |
"Answer strictly based on the provided context. Do not use outside knowledge.",
|
| 294 |
+
"Context: Due to a recent treaty in 2030, the capital of France was officially moved to Lyon.\n\nQuestion: What is the capital of France?"
|
| 295 |
],
|
| 296 |
# Example 2: Parametric Interference (Pisa)
|
| 297 |
[
|
| 298 |
"Answer strictly based on the provided context.",
|
| 299 |
+
"Context: The Leaning Tower of Pisa is located in Pisa, Italy. It was built in the 12th century.\n\nQuestion: Where is the Leaning Tower of Pisa?"
|
| 300 |
],
|
| 301 |
# Example 3: Difficult Fictional (Conditions)
|
| 302 |
[
|
| 303 |
"Use only the context provided.",
|
| 304 |
+
"Context: The XJ-9000 smartphone features a 6-inch screen, 12 hours of battery life, and is water-resistant up to 2 meters for 30 minutes.\n\nQuestion: What are the water resistance specs of the XJ-9000?"
|
| 305 |
],
|
| 306 |
# Example 4: Difficult Fictional (Extrinsic)
|
| 307 |
[
|
| 308 |
"Use only the context provided.",
|
| 309 |
+
"Context: Dr. Aris Thorne discovered the luminescent moss 'Glowleaf' in the caves of Mount Ebon. The moss emits a faint blue light when exposed to moisture.\n\nQuestion: Tell me about Dr. Thorne's discovery."
|
| 310 |
],
|
| 311 |
# Example 5: Long Context with Distractors
|
| 312 |
[
|
| 313 |
"Use only the context provided.",
|
| 314 |
+
"Context: Project Chronos was initiated in 2042 by Apex Dynamics to explore the Mariana Trench using the 'Abyss-1' submersible. The team consisted of 12 marine biologists and 4 engineers. The primary objective was to locate the rare 'Lumina' coral. During the 3-week expedition, they discovered a new species of blind shrimp, but the Lumina coral was not found. A secondary mission, Project Helios, was planned for 2045 to explore the Arctic Ocean. The Abyss-1 submersible suffered minor thruster damage on day 14, forcing the team to rely on backup navigation.\n\nQuestion: Summarize the details and outcome of Project Chronos."
|
| 315 |
],
|
| 316 |
# Example 6: Unanswerable Context with Distractor
|
| 317 |
[
|
| 318 |
"Answer strictly based on the provided context.",
|
| 319 |
+
"Context: The Orion V2 smartwatch features a titanium casing, a heart-rate monitor, and a 4-day battery life. It is available in Silver and Midnight Black. The previous model, Orion V1, included a sleep tracking feature that was highly praised by users.\n\nQuestion: Does the Orion V2 smartwatch have sleep tracking?"
|
| 320 |
]
|
| 321 |
],
|
| 322 |
inputs=[system_prompt_input_gen, prompt_input_gen],
|
| 323 |
+
examples_per_page=20,
|
| 324 |
label="π Click an Example to Auto-Fill (Note: These examples are manually made up to demonstrate specific hallucination types, including parametric interference, and were not generated by an LLM. They serve as synthetic experimental samples.)"
|
| 325 |
)
|
| 326 |
|