From 3eda91c1e4e4cf2694cc1c766e61fcb7aa746f73 Mon Sep 17 00:00:00 2001 From: zachary62 Date: Thu, 2 Jan 2025 16:31:52 +0000 Subject: [PATCH] tools --- docs/structure.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/structure.md b/docs/structure.md index cc2b123..101aa32 100644 --- a/docs/structure.md +++ b/docs/structure.md @@ -12,7 +12,7 @@ In many use cases, you may want the LLM to output a specific structure, such as There are several approaches to achieve a structured output: - **Prompting** the LLM to strictly return a defined structure. - Using LLMs that natively support **schema enforcement**. -- **Post-processing** the LLM’s response to extract structured content. +- **Post-processing** the LLM's response to extract structured content. In practice, **Prompting** is simple and reliable for modern LLMs. @@ -50,7 +50,7 @@ server: ## Prompt Engineering When prompting the LLM to produce **structured** output: -1. **Wrap** the structure in code fences (e.g., ` ```yaml`). +1. **Wrap** the structure in code fences (e.g., `yaml`). 2. **Validate** that all required fields exist (and let `Node` handles retry). ### Example Text Summarization @@ -85,7 +85,7 @@ summary: ### Why YAML instead of JSON? -Current LLMs struggle with escaping. YAML is easier with strings since they don’t always need quotes. +Current LLMs struggle with escaping. YAML is easier with strings since they don't always need quotes. **In JSON**