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 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' - Batch Classification (User Defined): 'examples/batch_classification.md' - LLM Self Critique: 'examples/self_critique.md' - Extracting Tables with GPT-V: 'examples/extracting_tables.md' - Extracting From Slides with GPT-V: 'examples/extract_slides.md' - Content Moderation: 'examples/moderation.md' - Citing Sources (RAG): 'examples/exact_citations.md' - Extracting Knowledge Graphs: 'examples/knowledge_graph.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' - Ollama: 'examples/ollama.md' - SQLModel Integration: 'examples/sqlmodel.md' - Including Examples in Prompt: 'examples/examples.md' - Blog: - "blog/index.md" - Concepts: - Models: 'concepts/models.md' - Fields: 'concepts/fields.md' - Types: 'concepts/types.md' - Validators: "concepts/reask_validation.md" - Usage Tokens: 'concepts/usage.md' - Missing: "concepts/maybe.md" - Patching: 'concepts/patching.md' - Retrying: 'concepts/retrying.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-V: 'hub/tables_from_vision.md' - Extract Pandas Dataframes: 'hub/pandas_df.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' - Batch 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" - 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' plugins: - 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 feedback form. social: - icon: fontawesome/brands/twitter link: https://twitter.com/jxnlco - icon: fontawesome/brands/github link: https://github.com/jxnl