update doc
This commit is contained in:
parent
c39cc22820
commit
04261bdade
|
|
@ -16,9 +16,9 @@ There are several approaches to achieve a structured output:
|
||||||
|
|
||||||
In practice, **Prompting** is simple and reliable for modern LLMs.
|
In practice, **Prompting** is simple and reliable for modern LLMs.
|
||||||
|
|
||||||
## Example Use Cases
|
### Example Use Cases
|
||||||
|
|
||||||
1. **Extracting Key Information**
|
- Extracting Key Information
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
product:
|
product:
|
||||||
|
|
@ -29,7 +29,7 @@ product:
|
||||||
Recommended for advanced users.
|
Recommended for advanced users.
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Summarizing Documents into Bullet Points**
|
- Summarizing Documents into Bullet Points
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
summary:
|
summary:
|
||||||
|
|
@ -38,7 +38,7 @@ summary:
|
||||||
- Suitable for all skill levels.
|
- Suitable for all skill levels.
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Generating Configuration Files**
|
- Generating Configuration Files
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
server:
|
server:
|
||||||
|
|
@ -50,8 +50,8 @@ server:
|
||||||
## Prompt Engineering
|
## Prompt Engineering
|
||||||
|
|
||||||
When prompting the LLM to produce **structured** output:
|
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 retry if necessary).
|
2. **Validate** that all required fields exist (and let `Node` handles retry).
|
||||||
|
|
||||||
### Example Text Summarization
|
### Example Text Summarization
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue