Skip to content

Commit 103e243

Browse files
committed
getting there
1 parent 5fe9709 commit 103e243

2 files changed

Lines changed: 73 additions & 1 deletion

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
id: explode_feedback_example
2+
description: Example flow with Explode fan-out and feedback collection
3+
4+
flows:
5+
- id: topic_facts_generator
6+
description: Generate interesting facts for multiple topics with feedback
7+
variables:
8+
- id: topics_json
9+
type: text
10+
- id: topics
11+
type: list[text]
12+
- id: topic
13+
type: text
14+
- id: formatted_prompt
15+
type: text
16+
- id: fact
17+
type: text
18+
feedback:
19+
type: thumbs
20+
explanation: true
21+
steps:
22+
- type: Decoder
23+
id: decode
24+
format: json
25+
inputs:
26+
- topics_json
27+
outputs:
28+
- topics
29+
30+
- type: Explode
31+
id: fan_out
32+
inputs:
33+
- topics
34+
outputs:
35+
- topic
36+
37+
- type: PromptTemplate
38+
id: prompt
39+
template: |
40+
Generate one interesting, concise fact about: {topic}
41+
42+
Keep it to 1-2 sentences and make it engaging.
43+
inputs:
44+
- topic
45+
outputs:
46+
- formatted_prompt
47+
48+
- type: LLMInference
49+
id: llm
50+
model: nova
51+
inputs:
52+
- formatted_prompt
53+
outputs:
54+
- fact
55+
inputs:
56+
- topics_json
57+
outputs:
58+
- fact
59+
60+
models:
61+
- id: nova
62+
type: Model
63+
provider: aws-bedrock
64+
model_id: us.amazon.nova-lite-v1:0
65+
inference_params:
66+
temperature: 0.7
67+
max_tokens: 200
68+
69+
telemetry:
70+
id: explode_feedback_telemetry
71+
provider: Phoenix
72+
endpoint: http://localhost:6006/v1/traces

examples/feedback/rating_feedback_example.qtype.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ flows:
2121
template: |
2222
Summarize the following document in 2-3 sentences:
2323
24-
{{document_text}}
24+
{document_text}
2525
2626
Summary:
2727
inputs:

0 commit comments

Comments
 (0)