-
-
Notifications
You must be signed in to change notification settings - Fork 664
/
mkdocs.yml
401 lines (399 loc) · 17 KB
/
mkdocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
site_name: Instructor
site_author: Jason Liu
site_description: A lightweight library for structured outputs with LLMs.
repo_name: instructor
repo_url: https://github.com/jxnl/instructor/
site_url: https://python.useinstructor.com/
edit_uri: edit/main/docs/
copyright: Copyright © 2024 Jason Liu
theme:
name: material
icon:
repo: fontawesome/brands/github
edit: material/pencil
view: material/eye
theme:
admonition:
note: octicons/tag-16
abstract: octicons/checklist-16
info: octicons/info-16
tip: octicons/squirrel-16
success: octicons/check-16
question: octicons/question-16
warning: octicons/alert-16
failure: octicons/x-circle-16
danger: octicons/zap-16
bug: octicons/bug-16
example: octicons/beaker-16
quote: octicons/quote-16
features:
- announce.dismiss
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.code.select
- content.tabs.link
- content.tooltips
- header.autohide
- navigation.expand
- navigation.footer
- navigation.indexes
- navigation.instant
- navigation.instant.prefetch
- navigation.instant.progress
- navigation.prune
- navigation.sections
- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate
palette:
- scheme: default
primary: black
accent: indigo
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: black
accent: indigo
toggle:
icon: material/brightness-4
name: Switch to light mode
font:
text: Roboto
code: Roboto Mono
custom_dir: docs/overrides
# Extensions
markdown_extensions:
- abbr
- admonition
- pymdownx.details
- attr_list
- def_list
- footnotes
- md_in_html
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:material.extensions.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
normalize_issue_symbols: true
repo_url_shorthand: true
user: jxnl
repo: instructor
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.snippets:
auto_append:
- includes/mkdocs.md
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
combine_header_slug: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.arithmatex:
generic: true
extra_javascript:
- javascripts/katex.js
- https://unpkg.com/katex@0/dist/katex.min.js
- https://unpkg.com/katex@0/dist/contrib/auto-render.min.js
extra_css:
- https://unpkg.com/katex@0/dist/katex.min.css
nav:
- Introduction:
- Structured Outputs for LLMs: 'index.md'
- Why use Instructor?: 'why.md'
- Help with Instructor: 'help.md'
- Newsletter: 'newsletter.md'
- Installation: 'installation.md'
- Contributing: 'contributing.md'
- Philosophy: 'concepts/philosophy.md'
- API Reference: 'api.md'
- Cookbook:
- Cookbooks: 'examples/index.md'
- "Recursive Schema Examples": 'examples/recursive.md'
- "Enhancing Text Classification": 'examples/classification.md'
- "Local Classification with Llama-cpp": 'examples/local_classification.md'
- "Structured Outputs with Ollama": 'examples/ollama.md'
- "Multi-Modal Data with Gemini": 'examples/multi_modal_gemini.md'
- "Exact Citations for RAG": 'examples/exact_citations.md'
- "Extracting Knowledge Graphs": 'examples/knowledge_graph.md'
- "Table Extraction with GPT-4 Vision": 'examples/extracting_tables.md'
- "User-Defined Bulk Classification": 'examples/bulk_classification.md'
- "AI Model Self-Correction": 'examples/self_critique.md'
- "Receipt Data Extraction with GPT-4": 'examples/extracting_receipts.md'
- "Slide Data Extraction with GPT-4": 'examples/extract_slides.md'
- "Content Moderation with OpenAI": 'examples/moderation.md'
- "Complex Entity Resolution": 'examples/entity_resolution.md'
- "Expanding RAG Search Queries": 'examples/search.md'
- "RAG Query Planning": 'examples/planning-tasks.md'
- "PII Data Sanitization": 'examples/pii.md'
- "Integrating Open Source Models": 'examples/open_source.md'
- "Image to Ad Copy Generation": 'examples/image_to_ad_copy.md'
- "SQLModel Integration": 'examples/sqlmodel.md'
- "Examples in Pydantic Models": 'examples/examples.md'
- "Intelligent Document Segmentation": 'examples/document_segmentation.md'
- "Structured Output with watsonx.ai": 'examples/watsonx.md'
- "OpenAI Batch Jobs with Instructor": 'examples/batch_job_oai.md'
- "Structured Outputs with Groq": 'examples/groq.md'
- "Structured Outputs with Mistral": 'examples/mistral.md'
- "Action Items Extraction": 'examples/action_items.md'
- "Batch Classification with LangSmith": 'examples/batch_classification_langsmith.md'
- "Contact Information Extraction": 'examples/extract_contact_info.md'
- "Knowledge Graph Building": 'examples/building_knowledge_graph.md'
- "Multiple Classification Tasks": 'examples/multiple_classification.md'
- "Pandas DataFrame Integration": 'examples/pandas_df.md'
- "Partial Response Streaming": 'examples/partial_streaming.md'
- "Single Classification Tasks": 'examples/single_classification.md'
- "Table Extraction from Images": 'examples/tables_from_vision.md'
- "YouTube Clip Analysis": 'examples/youtube_clips.md'
- Blog:
- "blog/index.md"
- Concepts:
- Overview: 'concepts/index.md'
- Models: 'concepts/models.md'
- Lists and Arrays: 'concepts/lists.md'
- Prompting: 'concepts/prompting.md'
- Multimodal : 'concepts/multimodal.md'
- Retrying: 'concepts/retrying.md'
- Patching: 'concepts/patching.md'
- Hooks: 'concepts/hooks.md'
- Fields: 'concepts/fields.md'
- Types: 'concepts/types.md'
- TypedDicts: 'concepts/typeddicts.md'
- Validators: "concepts/reask_validation.md"
- Usage Tokens: 'concepts/usage.md'
- Missing: "concepts/maybe.md"
- Parallel Tools: 'concepts/parallel.md'
- Stream Iterable: "concepts/iterable.md"
- Stream Partial: "concepts/partial.md"
- Raw Response: 'concepts/raw_response.md'
- FastAPI: 'concepts/fastapi.md'
- Caching: 'concepts/caching.md'
- Prompt Caching: 'concepts/prompt_caching.md'
- Logging: 'concepts/logging.md'
- Distillation: "concepts/distillation.md"
- Union: 'concepts/union.md'
- Unions: 'concepts/unions.md'
- Validation: 'concepts/validation.md'
- Alias: 'concepts/alias.md'
- Enums: 'concepts/enums.md'
- Type Adapter: 'concepts/typeadapter.md'
- Templating: 'concepts/templating.md'
- Integrations:
- Overview: 'integrations/index.md'
- Anthropic: 'integrations/anthropic.md'
- Azure OpenAI: 'integrations/azure.md'
- Cerebras: 'integrations/cerebras.md'
- Cohere: 'integrations/cohere.md'
- Cortex: 'integrations/cortex.md'
- Fireworks: 'integrations/fireworks.md'
- Gemini: 'integrations/google.md'
- Groq: 'integrations/groq.md'
- LiteLLM: 'integrations/litellm.md'
- llama-cpp-python: 'integrations/llama-cpp-python.md'
- Mistral: 'integrations/mistral.md'
- Ollama: 'integrations/ollama.md'
- OpenAI: 'integrations/openai.md'
- Together: 'integrations/together.md'
- Vertex AI: 'integrations/vertex.md'
- Writer: 'integrations/writer.md'
- DeepSeek: 'integrations/deepseek.md'
- CLI Reference:
- "CLI Reference": "cli/index.md"
- "Finetuning GPT-3.5": "cli/finetune.md"
- "Usage Tracking": "cli/usage.md"
- "Batch Jobs": "cli/batch.md"
- Tutorials:
- Overview: 'tutorials/index.md'
- Tutorials (Notebooks): 'tutorials/1-introduction.ipynb'
- Tips and Tricks: 'tutorials/2-tips.ipynb'
- Applications RAG: 'tutorials/3-0-applications-rag.ipynb'
- Applications RAG - 2: 'tutorials/3-1-validation-rag.ipynb'
- Validation: 'tutorials/4-validation.ipynb'
- Knowledge Graphs: 'tutorials/5-knowledge-graphs.ipynb'
- Chain of Density: 'tutorials/6-chain-of-density.ipynb'
- Synthetic Data Generation: 'tutorials/7-synthetic-data-generation.ipynb'
- Jobs Board (External):
- Jobs: 'jobs.md'
- Prompt Design:
- "prompting/index.md"
- Zero-Shot:
- Use Emotional Language: 'prompting/zero_shot/emotion_prompting.md'
- Assign a Role: 'prompting/zero_shot/role_prompting.md'
- Define A Style: 'prompting/zero_shot/style_prompting.md'
- Auto-Refine The Prompt: 'prompting/zero_shot/s2a.md'
- Simulate A Perspective: 'prompting/zero_shot/simtom.md'
- Clarify Ambiguous Information: 'prompting/zero_shot/rar.md'
- Ask Model To Repeat Query: 'prompting/zero_shot/re2.md'
- Generate Follow-Up Questions: 'prompting/zero_shot/self_ask.md'
- Few-Shot:
- Example Generation:
- Generate In-Context Examples: 'prompting/few_shot/example_generation/sg_icl.md'
- Example Ordering: 'prompting/few_shot/example_ordering.md'
- Exemplar Selection:
- Select Effective Examples: 'prompting/few_shot/exemplar_selection/knn.md'
- Vote-K: 'prompting/few_shot/exemplar_selection/vote_k.md'
- Consistent Based Examples: 'prompting/few_shot/cosp.md'
- Thought Generation:
- Chain-Of-Thought (Zero-Shot):
- Generate Examples First: 'prompting/thought_generation/chain_of_thought_zero_shot/analogical_prompting.md'
- Consider Higher-Level Context: 'prompting/thought_generation/chain_of_thought_zero_shot/step_back_prompting.md'
- Examine The Context: 'prompting/thought_generation/chain_of_thought_zero_shot/thread_of_thought.md'
- Structure The Reasoning: 'prompting/thought_generation/chain_of_thought_zero_shot/tab_cot.md'
- Chain-Of-Thought (Few-Shot):
- Prioritize Uncertain Examples: 'prompting/thought_generation/chain_of_thought_few_shot/active_prompt.md'
- Automate Example Selection: 'prompting/thought_generation/chain_of_thought_few_shot/auto_cot.md'
- Prioritize Complex Examples: 'prompting/thought_generation/chain_of_thought_few_shot/complexity_based.md'
- Include Incorrect Examples: 'prompting/thought_generation/chain_of_thought_few_shot/contrastive.md'
- Memory-of-Thought: 'prompting/thought_generation/chain_of_thought_few_shot/memory_of_thought.md'
- Use Majority Voting: 'prompting/thought_generation/chain_of_thought_few_shot/uncertainty_routed_cot.md'
- Generate Prompt Variations: 'prompting/thought_generation/chain_of_thought_few_shot/prompt_mining.md'
- Ensembling:
- Prioritize Consistent Examples: 'prompting/ensembling/cosp.md'
- Use Distinct Example Subsets: 'prompting/ensembling/dense.md'
- Verify Responses over Majority Voting : 'prompting/ensembling/diverse.md'
- Use Ensembles To Test Prompts: 'prompting/ensembling/max_mutual_information.md'
- Combine Multiple Reasoning Chains: 'prompting/ensembling/meta_cot.md'
- Combine Different Specialized LLMs: 'prompting/ensembling/more.md'
- Generate Multiple Candidate Responses: 'prompting/ensembling/self_consistency.md'
- Use LLMs to Combine Different Responses: 'prompting/ensembling/universal_self_consistency.md'
- Use Task Specific Evaluation Metrics: 'prompting/ensembling/usp.md'
- Use Translation for Paraphrasing: 'prompting/ensembling/prompt_paraphrasing.md'
- Self-Criticism:
- Independently Verify Responses: 'prompting/self_criticism/chain_of_verification.md'
- Determine Uncertainty of Reasoning Chain: 'prompting/self_criticism/self_calibration.md'
- Improve With Feedback: 'prompting/self_criticism/self_refine.md'
- Self-Verify Responses: 'prompting/self_criticism/self_verification.md'
- Reconstruct Prompt from Reasoning Steps : 'prompting/self_criticism/reversecot.md'
- Break Down Reasoning Into Multiple Steps: 'prompting/self_criticism/cumulative_reason.md'
- Decomposition:
- Break Down Complex Tasks: 'prompting/decomposition/decomp.md'
- Leverage Task Specific Systems: 'prompting/decomposition/faithful_cot.md'
- Solve simpler subproblems: 'prompting/decomposition/least_to_most.md'
- Ditch Vanilla Chain Of Thought: 'prompting/decomposition/plan_and_solve.md'
- Generate Python for Intermediate Steps: 'prompting/decomposition/program_of_thought.md'
- Recurs.-of-Thought: 'prompting/decomposition/recurs_of_thought.md'
- Generate in Parallel: 'prompting/decomposition/skeleton_of_thought.md'
- Tree-of-Thought: 'prompting/decomposition/tree-of-thought.md'
plugins:
- redirects:
redirect_maps:
jobs.md: https://jobs.applied-llms.org/
# LLM client redirects
hub/ollama.md: integrations/ollama.md
hub/llama-cpp-python.md: integrations/llama-cpp-python.md
hub/anthropic.md: integrations/anthropic.md
hub/azure.md: integrations/azure.md
hub/cerebras.md: integrations/cerebras.md
hub/cohere.md: integrations/cohere.md
hub/fireworks.md: integrations/fireworks.md
hub/google.md: integrations/google.md
hub/groq.md: integrations/groq.md
hub/litellm.md: integrations/litellm.md
hub/mistral.md: integrations/mistral.md
hub/openai.md: integrations/openai.md
hub/together.md: integrations/together.md
hub/vertex.md: integrations/vertex.md
hub/vertexai.md: integrations/vertex.md # Handle old vertexai.md references
# Legacy hub/clients/ redirects
'hub/clients/google.md': 'integrations/google.md'
'hub/clients/litellm.md': 'integrations/litellm.md'
'hub/clients/ollama.md': 'integrations/ollama.md'
'hub/clients/llama-cpp-python.md': 'integrations/llama-cpp-python.md'
'hub/clients/anthropic.md': 'integrations/anthropic.md'
'hub/clients/azure.md': 'integrations/azure.md'
'hub/clients/cerebras.md': 'integrations/cerebras.md'
'hub/clients/cohere.md': 'integrations/cohere.md'
'hub/clients/fireworks.md': 'integrations/fireworks.md'
'hub/clients/groq.md': 'integrations/groq.md'
'hub/clients/mistral.md': 'integrations/mistral.md'
'hub/clients/openai.md': 'integrations/openai.md'
'hub/clients/together.md': 'integrations/together.md'
'hub/clients/vertex.md': 'integrations/vertex.md'
'hub/clients/vertexai.md': 'integrations/vertex.md'
# Example redirects
'hub/action_items.md': 'examples/action_items.md'
'hub/batch_classification_langsmith.md': 'examples/batch_classification_langsmith.md'
'hub/extract_contact_info.md': 'examples/extract_contact_info.md'
'hub/index.md': 'examples/index.md'
'hub/knowledge_graph.md': 'examples/building_knowledge_graph.md'
'hub/multiple_classification.md': 'examples/multiple_classification.md'
'hub/pandas_df.md': 'examples/pandas_df.md'
'hub/partial_streaming.md': 'examples/partial_streaming.md'
'hub/single_classification.md': 'examples/single_classification.md'
'hub/tables_from_vision.md': 'examples/tables_from_vision.md'
'hub/youtube_clips.md': 'examples/youtube_clips.md'
- mkdocs-jupyter:
ignore_h1_titles: true
execute: false
- social
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\b)(?=[A-Z][a-z])'
- minify:
minify_html: true
- mkdocstrings:
handlers:
python:
options:
members_order: alphabetical
allow_inspection: true
show_bases: true
- blog:
enabled: !ENV CI
blog_dir: "blog"
blog_toc: true
post_dir: blog/posts
post_date_format: yyyy/MM/dd
post_url_format: "{date}/{slug}"
authors_file: "{blog}/.authors.yml"
hooks:
- docs/hooks/hide_lines.py
extra:
analytics:
provider: google
property: G-5CR8QXF5CN
feedback:
title: Was this page helpful?
ratings:
- icon: material/emoticon-happy-outline
name: This page was helpful
data: 1
note: >-
Thanks for your feedback!
- icon: material/emoticon-sad-outline
name: This page could be improved
data: 0
note: >-
Thanks for your feedback! Help us improve this page by
using our <a href="https://forms.gle/ijr9Zrcg2QWgKoWs7" target="_blank" rel="noopener">feedback form</a>.
social:
- icon: fontawesome/brands/twitter
link: https://twitter.com/jxnlco
- icon: fontawesome/brands/github
link: https://github.com/jxnl