Skip to content

ehcastroh/StructuredLLMOutputs

Repository files navigation

Structured LLM Output

Overview

This project implements a structured LLM Output workflow. It demonstrates how Pydantic can structure output so it can be used for tasks such as user-input, data and LLM-ouput validation, as well as improving trace/span evals (among many others).

The repo is structured with:

  • A Jupyter Notebook (pydantic_user_input_validation.ipynb) for ideation, design, and experimentation related to user-input validation and error handling

  • A Jupyter Notebook (pydantic_llm_response_validation.ipynb) for ideation, design, and experimentation related to LLM-output validation and error handling

Getting Started

  1. Install dependencies
pip install -r requirements.txt
  1. Set Antropic or OpenAI API key In a .env file in the project root:
ANTHROPIC_API_KEY="your_api_key_here"
OPENAI_API_KEY="your_api_key_here"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors