• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Thursday, July 9, 2026
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Al, Analytics and Automation

Build a Complete Langfuse Observability and Evaluation Pipeline for Tracing, Prompt Management, Scoring, and Experiments

Josh by Josh
May 25, 2026
in Al, Analytics and Automation
0
Build a Complete Langfuse Observability and Evaluation Pipeline for Tracing, Prompt Management, Scoring, and Experiments


print("\nPART 5 ── Datasets & experiments --------------------------------------")
DATASET = "capital-cities-tutorial"
langfuse.create_dataset(name=DATASET, description="Capital-city QA benchmark")
_items = [
   ("What is the capital of France?",  "Paris"),
   ("What is the capital of Germany?", "Berlin"),
   ("What is the capital of Japan?",   "Tokyo"),
   ("What is the capital of Italy?",   "Rome"),
]
for i, (q, a) in enumerate(_items):
   langfuse.create_dataset_item(dataset_name=DATASET, id=f"cap-{i}",
                                input={"question": q}, expected_output=a)
def capital_task(*, item, **kwargs):
   question = item.input["question"] if isinstance(item.input, dict) else item.input
   return llm_chat([{"role": "user", "content": question}], name="experiment-answer")
def accuracy(*, input, output, expected_output, metadata=None, **kwargs):
   hit = bool(expected_output) and expected_output.lower() in (output or "").lower()
   return Evaluation(name="accuracy", value=1.0 if hit else 0.0,
                     comment="exact-match contains check")
def conciseness(*, input, output, **kwargs):
   return Evaluation(name="char_length", value=float(len(output or "")))
def mean_accuracy(*, item_results, **kwargs):
   vals = [e.value for r in item_results for e in r.evaluations if e.name == "accuracy"]
   avg = sum(vals) / len(vals) if vals else 0.0
   return Evaluation(name="mean_accuracy", value=avg, comment=f"{avg:.0%} correct")
dataset = langfuse.get_dataset(DATASET)
result = dataset.run_experiment(
   name="capitals-baseline",
   description="Baseline run from the Colab tutorial",
   task=capital_task,
   evaluators=[accuracy, conciseness],
   run_evaluators=[mean_accuracy],
   max_concurrency=4,
)
print(result.format())



Source_link

READ ALSO

Tiny robot boats build floating structures | MIT News

NVIDIA Releases Nemotron-Labs-3-Puzzle-75B-A9B: A Compressed Hybrid MoE LLM Delivering 2.03x Server Throughput at Matched User Throughput

Related Posts

Tiny robot boats build floating structures | MIT News
Al, Analytics and Automation

Tiny robot boats build floating structures | MIT News

July 9, 2026
NVIDIA Releases Nemotron-Labs-3-Puzzle-75B-A9B: A Compressed Hybrid MoE LLM Delivering 2.03x Server Throughput at Matched User Throughput
Al, Analytics and Automation

NVIDIA Releases Nemotron-Labs-3-Puzzle-75B-A9B: A Compressed Hybrid MoE LLM Delivering 2.03x Server Throughput at Matched User Throughput

July 9, 2026
Model Context Protocol Explained in 3 Levels of Difficulty
Al, Analytics and Automation

Model Context Protocol Explained in 3 Levels of Difficulty

July 9, 2026
Jesse Thaler named director of the Laboratory for Nuclear Science | MIT News
Al, Analytics and Automation

Jesse Thaler named director of the Laboratory for Nuclear Science | MIT News

July 9, 2026
Netflix AI Team Cuts Wide-Partition Read Latency from Seconds to Milliseconds by Splitting Cassandra Partitions Per ID
Al, Analytics and Automation

Netflix AI Team Cuts Wide-Partition Read Latency from Seconds to Milliseconds by Splitting Cassandra Partitions Per ID

July 8, 2026
Context Window Management for Long-Running Agents: Strategies and Tradeoffs
Al, Analytics and Automation

Context Window Management for Long-Running Agents: Strategies and Tradeoffs

July 8, 2026
Next Post
Why short clips are taking over your social media feed

Why short clips are taking over your social media feed

POPULAR NEWS

Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025
Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

November 4, 2025

EDITOR'S PICK

AI Interview Series #4: Explain KV Caching

AI Interview Series #4: Explain KV Caching

December 21, 2025
In-Depth Review of RecoveryFox AI

In-Depth Review of RecoveryFox AI

June 5, 2025
Continuing to bring you our latest models, with an improved Gemini 2.5 Flash and Flash-Lite release

Continuing to bring you our latest models, with an improved Gemini 2.5 Flash and Flash-Lite release

September 25, 2025

DoubleVerify Uncovers ShadowBot Scheme Involving 35 Million Spoofed Mobile Devices

July 31, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • Build Better Email Marketing Audiences
  • Top 10 Off Page SEO Services For Links and Brand Mentions
  • Retroid Pocket 5 And Flip 2 Are Getting A Spec Bump, But Will Cost $10 More After July 14
  • Tiny robot boats build floating structures | MIT News
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions