AI Algorithm Path
AI Algorithm Path
Mar 24, 2025 · Artificial Intelligence

How to Use Pydantic for Structured LLM Output

The article explains why LLM responses can be inconsistent, introduces Pydantic as a way to define custom output schemas, and walks through concrete examples—both with OpenAI and Ollama models—showing how to build a LangChain pipeline that parses responses into structured data.

LLMLangChainOllama
0 likes · 7 min read
How to Use Pydantic for Structured LLM Output
JavaEdge
JavaEdge
Jun 5, 2024 · Artificial Intelligence

Step‑by‑Step Guide to Building a Name‑Generator with LangChain and OpenAI

This tutorial walks through installing LangChain, creating an LLM with either self‑hosted or third‑party models, designing custom prompt templates, configuring output parsers for structured results, and running a complete Python example that generates culturally specific names using OpenAI's API.

LLMLangChainOpenAI
0 likes · 8 min read
Step‑by‑Step Guide to Building a Name‑Generator with LangChain and OpenAI