Transforming API Output Quality with Assertions // Vikram Rangnekar // MLOps Podcast #259 clip

MLOps.community · Advanced ·🤖 AI Agents & Automation ·1y ago

Key Takeaways

The video discusses using assertions to transform API output quality with Large Language Models (LLMs), ensuring outputs adhere to specified data types and enabling early failure detection and correction.

Full Transcript

I didn't quite understand the idea of these assertions and building out the API basically being able to validate the type yes and how you said all right well one abstraction is what they were doing with DSP but another abstraction is saying this can now be an API and so when we give whatever output to someone it comes in inherent with the idea of it's going to be in the type that you specify is that what I understand yes so there are two types of assertions one is you put them um you assert a type essentially you say you know while you're creating the function signature you just say this output type is string or string array or number or Boolean or whatever or you know and and the second type of assertion is like a custom function where you you want to like like actually do something with the output you might just you might actually call another llm if you really want you be like hey is this is this good enough if not throw like a error you know essentially and then the first LM can correct itself right so it's it's it's a function called on this input output value and uh and this can be done either when the whole value is available you can wait till the end of value you might have like multiple key values that are outputed so you know in which case then you know you might want to look at the whole value or you can do it as the value streaming out because it's not Json it if you can somehow validate it maybe you know you're looking for some prefix or something before so you can chop up every line that's coming wait for a line to come in then then kind of look at it with the regx and saying you know sorry you know you're messing up sort of thing yeah and this early failure is is great because now firstly the assertions concept makes it easy to code cuz now you have all of this like captured within your uh dpy program and when you initially put in the examples and you run the bootstrap all of this gets engaged right so the error correction all that's so your outputs all the traces are high quality in between because the assertions have ensured so in production less of the stuff happens right so cuz youve already fine-tuned it down to the correct what you need in terms of code you're not saying please add a dash in front of you know like you have an assertion it's explained that so you got high quality examples you just save those in there and the LM knows oh I know what this guy needs [Music] TR

Original Description

Ax a New Way to Build Complex Workflows with LLMs // MLOps Podcast #259 with Vikram Rangnekar, Software Engineer at Stealth. Vikram explains the concept of assertions, which ensure that outputs adhere to specified data types like strings, arrays, numbers, or booleans. He further elaborates on the flexibility of custom functions within assertions to perform real-time checks and automatic error handling. This means that developers can streamline their coding process, significantly reduce bugs, and maintain high-quality output by embedding these checks right within their development cycle. // Abstract Ax is a new way to build complex workflows with LLMs. It's a typescript library based on research done in the Stanford DSP paper. Concepts such as prompt signatures, prompt tuning, and composable prompts help you build RAG and agent-powered ideas that have till now been hard to build and maintain. Ax is designed for production usage. // Bio Vikram builds open-source software. Currently working on making it easy to build with LLMs. Created Ax a typescript library that abstracts over all the complexity of LLMs, it is based on the research done in the Stanford DSP paper. Worked extensively with LLMs over the last few years to build complex workflows. Previously worked as a senior software engineer with LinkedIn on Ad Serving. // MLOps Jobs board https://mlops.pallet.xyz/jobs // MLOps Swag/Merch https://mlops-community.myshopify.com/ // Related Links The unofficial DSPy framework. Build LLM-powered Agents and "Agentic workflows" based on the Stanford DSP paper: https://axllm.dev All the Hard Stuff with LLMs in Product Development // Phillip Carter // MLOps Podcast #170: https://youtu.be/DZgXln3v85s --------------- ✌️Connect With Us ✌️ ------------- Join our slack community: https://go.mlops.community/slack Follow us on Twitter: @mlopscommunity Sign up for the next meetup: https://go.mlops.community/register Catch all episodes, blogs, newsletters, and more: https://
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from MLOps.community · MLOps.community · 0 of 60

← Previous Next →
1 Our 1st MLOps Meetup // Luke Marsden // MLOps Meetup #1
Our 1st MLOps Meetup // Luke Marsden // MLOps Meetup #1
MLOps.community
2 Remote Collaboration as a Data Scientist
Remote Collaboration as a Data Scientist
MLOps.community
3 MLOps Manifesto with Luke Marsden from Dotscience
MLOps Manifesto with Luke Marsden from Dotscience
MLOps.community
4 MLOps lifecycle description
MLOps lifecycle description
MLOps.community
5 What Does Best in Class AI/ML Governance Look Like in Fin Services? // Charles Radclyffe // MLOps #2
What Does Best in Class AI/ML Governance Look Like in Fin Services? // Charles Radclyffe // MLOps #2
MLOps.community
6 Life purpose and too many spreadsheets
Life purpose and too many spreadsheets
MLOps.community
7 Explainability, Black boxes and EU white paper on reproducibility
Explainability, Black boxes and EU white paper on reproducibility
MLOps.community
8 Hierarchy of Machine Learning Needs // Phil Winder // MLOps Meetup #3
Hierarchy of Machine Learning Needs // Phil Winder // MLOps Meetup #3
MLOps.community
9 Automatically Retrain Machine Learning Models? Are best practices worth it?
Automatically Retrain Machine Learning Models? Are best practices worth it?
MLOps.community
10 Building an MLOps Team? Key ideas to keep in mind
Building an MLOps Team? Key ideas to keep in mind
MLOps.community
11 Hierarchy of MLOps Needs
Hierarchy of MLOps Needs
MLOps.community
12 Bare necessities for getting an ML model into production
Bare necessities for getting an ML model into production
MLOps.community
13 MLOps and Monitoring
MLOps and Monitoring
MLOps.community
14 How Phil Winder got into Data Science and Software Engineering
How Phil Winder got into Data Science and Software Engineering
MLOps.community
15 Provenance and Reproducibility in Machine Learning; what is it and why you need it?
Provenance and Reproducibility in Machine Learning; what is it and why you need it?
MLOps.community
16 Friction Between Data Scientists and Software Engineers
Friction Between Data Scientists and Software Engineers
MLOps.community
17 MLOps Problems in different size companies
MLOps Problems in different size companies
MLOps.community
18 ML tooling in large companies
ML tooling in large companies
MLOps.community
19 ML Platforms - The build vs buy question
ML Platforms - The build vs buy question
MLOps.community
20 ML Services Gateway at SurveyMonkey
ML Services Gateway at SurveyMonkey
MLOps.community
21 Message buses, Async and sync architecture
Message buses, Async and sync architecture
MLOps.community
22 MLOps #4: Shubhi Jain - Building an ML Platform @SurveyMonkey
MLOps #4: Shubhi Jain - Building an ML Platform @SurveyMonkey
MLOps.community
23 Hybrid Data Science Teams @SurveyMonkey
Hybrid Data Science Teams @SurveyMonkey
MLOps.community
24 How do you handle ML version control at SurveyMonkey
How do you handle ML version control at SurveyMonkey
MLOps.community
25 Doing ML with Personal Information
Doing ML with Personal Information
MLOps.community
26 Evolution of the ML feature store @SurveyMonkey
Evolution of the ML feature store @SurveyMonkey
MLOps.community
27 Developing a Machine Learning Feature Store
Developing a Machine Learning Feature Store
MLOps.community
28 Auto retrain ML models is not the question
Auto retrain ML models is not the question
MLOps.community
29 3 key parts to Machine Learning monitoring
3 key parts to Machine Learning monitoring
MLOps.community
30 MLOps Meetup #6: Mid-Scale Production Feature Engineering with Dr. Venkata Pingali
MLOps Meetup #6: Mid-Scale Production Feature Engineering with Dr. Venkata Pingali
MLOps.community
31 MLOps meetup #5 High Stakes ML: Active Failures, Latent Factors with Flavio Clesio
MLOps meetup #5 High Stakes ML: Active Failures, Latent Factors with Flavio Clesio
MLOps.community
32 MLOps: Airflow Pros and Cons
MLOps: Airflow Pros and Cons
MLOps.community
33 Specific challenges in Machine Learning
Specific challenges in Machine Learning
MLOps.community
34 Current State Of Machine Learning
Current State Of Machine Learning
MLOps.community
35 Humans in the Loop are a defining factor in Machine Learning
Humans in the Loop are a defining factor in Machine Learning
MLOps.community
36 Learning from real life Machine Learning failures
Learning from real life Machine Learning failures
MLOps.community
37 Survivorship Bias in machine learning tutorials
Survivorship Bias in machine learning tutorials
MLOps.community
38 Swiss Cheese model in Machine Learning
Swiss Cheese model in Machine Learning
MLOps.community
39 Resume driven development in Machine learning & software engineering
Resume driven development in Machine learning & software engineering
MLOps.community
40 Who has the highest standards in ML?
Who has the highest standards in ML?
MLOps.community
41 Venkata Pingali of Scribble Data Thoughts on the Current State of Machine Learning
Venkata Pingali of Scribble Data Thoughts on the Current State of Machine Learning
MLOps.community
42 Dependable data and being able to Trust in your Data with Venkata Pengali of Scribble Data
Dependable data and being able to Trust in your Data with Venkata Pengali of Scribble Data
MLOps.community
43 Speed, Trust, Evolution and Scale in MLOps
Speed, Trust, Evolution and Scale in MLOps
MLOps.community
44 More difficult transition for data scientists to become ML engineers
More difficult transition for data scientists to become ML engineers
MLOps.community
45 How many models in prod til I need a dedicated ML platform?
How many models in prod til I need a dedicated ML platform?
MLOps.community
46 Deeper thinking from data scientists around platform blackholes
Deeper thinking from data scientists around platform blackholes
MLOps.community
47 Checkpointing, metadata, and confidence in your data
Checkpointing, metadata, and confidence in your data
MLOps.community
48 Adjacent usecases and multistep feature engineering
Adjacent usecases and multistep feature engineering
MLOps.community
49 Standardization of Machine Learning tools like in Software Engineering with Venkata Pingali
Standardization of Machine Learning tools like in Software Engineering with Venkata Pingali
MLOps.community
50 Reproducability flaws in end to end Machine Learning debugging
Reproducability flaws in end to end Machine Learning debugging
MLOps.community
51 3rd wave of data scientists
3rd wave of data scientists
MLOps.community
52 MLOps meetup #7 Alex Spanos // TrueLayer 's MLOps Pipeline
MLOps meetup #7 Alex Spanos // TrueLayer 's MLOps Pipeline
MLOps.community
53 MLOps Meetup #8 Optimizing Your ML Workflow with Kubeflow 1.0
MLOps Meetup #8 Optimizing Your ML Workflow with Kubeflow 1.0
MLOps.community
54 Are Kubeflow and Airflow complementary?
Are Kubeflow and Airflow complementary?
MLOps.community
55 Why Kubeflow gained so much traction=open community
Why Kubeflow gained so much traction=open community
MLOps.community
56 Who decides the dirrection of Kubeflow
Who decides the dirrection of Kubeflow
MLOps.community
57 What do Kubeflow and Arrikto do and how do they work together?
What do Kubeflow and Arrikto do and how do they work together?
MLOps.community
58 Versioning your ML steps with Kubeflow
Versioning your ML steps with Kubeflow
MLOps.community
59 Machine Learning Lifecycles//Perception vs Reality
Machine Learning Lifecycles//Perception vs Reality
MLOps.community
60 Kubeflow vs SageMaker in Machine Learning
Kubeflow vs SageMaker in Machine Learning
MLOps.community

The video teaches how to use assertions to improve API output quality with LLMs, enabling early failure detection and correction, and ensuring high-quality outputs. This is crucial for building robust and reliable AI systems. By using assertions, developers can validate data types and ensure that outputs meet specified requirements.

Key Takeaways
  1. Define function signatures with specified output types
  2. Implement assertions for data validation
  3. Create custom functions for error correction
  4. Integrate assertions into LLM workflows
  5. Test and refine assertions for high-quality outputs
💡 Assertions can be used to transform API output quality with LLMs, enabling early failure detection and correction, and ensuring high-quality outputs.

Related Reads

📰
OpenAI Agents SDK: Building Production AI Agents (2026)
Learn to build production-ready AI agents using the OpenAI Agents SDK, a Python library for creating autonomous workflows
Dev.to · Carlos Oliva Pascual
📰
NestJS Agent Skills for Claude Code and Codex
Learn how to leverage NestJS agent skills for Claude Code and Codex to improve architecture, OOP, and runtime features
Dev.to · amir taherkhani
📰
How to Build a Production AI Agent That Won't Delete Your Database
Learn to build production-ready AI agents with safety features to prevent data loss and system failures
Dev.to · Abdul Rehman
📰
AI Agents in Production: Why 88% of Enterprise Pilots Fail (2026)
Learn why 88% of enterprise AI agent pilots fail to make it to production and how to overcome common obstacles
Dev.to · Carlos Oliva Pascual
Up next
LANGGRAPH: Other Frameworks Are DEAD Now!
Thomas Janssen
Watch →