forked from instructor-ai/instructor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkdocs.yml
329 lines (327 loc) · 13 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
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:
- Welcome To Instructor: 'index.md'
- Why use Instructor?: 'why.md'
- Help with Instructor: 'help.md'
- Installation: 'installation.md'
- Contributing: 'contributing.md'
- Philosophy: 'concepts/philosophy.md'
- Cookbook:
- Cookbooks: 'examples/index.md'
- Text Classification: 'examples/classification.md'
- Local Classification: 'examples/local_classification.md'
- Ollama: 'examples/ollama.md'
- Citing Sources (RAG): 'examples/exact_citations.md'
- Extracting Knowledge Graphs: 'examples/knowledge_graph.md'
- Extracting Tables with GPT-V: 'examples/extracting_tables.md'
- Bulk Classification (User Defined): 'examples/bulk_classification.md'
- LLM Self Critique: 'examples/self_critique.md'
- Extracting Receipts using GPT-4o: 'examples/extracting_receipts.md'
- Extracting From Slides with GPT-V: 'examples/extract_slides.md'
- Content Moderation: 'examples/moderation.md'
- Extracting Complex Entities: 'examples/entity_resolution.md'
- Expanding Search Queries (RAG): 'examples/search.md'
- Query Planning (RAG): 'examples/planning-tasks.md'
- PII Data Sanitization: 'examples/pii.md'
- Enabling Open Source Models: 'examples/open_source.md'
- Image to Ad Copy: 'examples/image_to_ad_copy.md'
- SQLModel Integration: 'examples/sqlmodel.md'
- Including Examples in Prompt: 'examples/examples.md'
- Document Segmentation: 'examples/document_segmentation.md'
- IBM watsonx.ai: 'examples/watsonx.md'
- Running a OpenAI batch job with Instructor: 'examples/batch_job_oai.md'
- Blog:
- "blog/index.md"
- Concepts:
- Models: 'concepts/models.md'
- Retrying: 'concepts/retrying.md'
- Patching: 'concepts/patching.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/lists.md"
- Stream Partial: "concepts/partial.md"
- Raw Response: 'concepts/raw_response.md'
- FastAPI: 'concepts/fastapi.md'
- Caching: 'concepts/caching.md'
- Logging: 'concepts/logging.md'
- Distillation: "concepts/distillation.md"
- Union: 'concepts/union.md'
- Alias: 'concepts/alias.md'
- Enums: 'concepts/enums.md'
- Type Adapter: 'concepts/typeadapter.md'
- Hub:
- Introducing Instructor Hub: 'hub/index.md'
- Single Classification Model: 'hub/single_classification.md'
- Multiple Classification Model: 'hub/multiple_classification.md'
- Extracting Tables using GPT-4o: 'hub/tables_from_vision.md'
- Extract Pandas Dataframes: 'hub/pandas_df.md'
- Using Vertex AI: 'hub/vertexai.md'
- Using Ollama: 'hub/ollama.md'
- Using Llama CPP: 'hub/llama-cpp-python.md'
- Using Together Compute: 'hub/together.md'
- Using Anyscale: 'hub/anyscale.md'
- Using Groq: 'hub/groq.md'
- Using Mistral: 'hub/mistral.md'
- Using Cohere: 'hub/cohere.md'
- Bulk Async Classification w/ Langsmith: 'hub/batch_classification_langsmith.md'
- Action Items: 'hub/action_items.md'
- Partial Streaming: 'hub/partial_streaming.md'
- Extract Contact Info: 'hub/extract_contact_info.md'
- Using Mistral Large: 'hub/mistral.md'
- Knowledge Graphs: 'hub/knowledge_graph.md'
- Extract Youtube Clips: "hub/youtube_clips.md"
- Knowledge Graphs: 'tutorials/5-knowledge-graphs.ipynb'
- 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:
- 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'
- 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'
- 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/
- mkdocs-jupyter:
ignore_h1_titles: true
execute: false
- social
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\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"
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