Skip to content

Commit

Permalink
Update the Learn DSPy docs (#1790)
Browse files Browse the repository at this point in the history
* Update the Learn DSPy docs

* fixes
  • Loading branch information
okhat authored Nov 12, 2024
1 parent 8ba1917 commit 5ebf2f7
Show file tree
Hide file tree
Showing 49 changed files with 789 additions and 917 deletions.
421 changes: 0 additions & 421 deletions docs/docs/building-blocks/1-language_models.md

This file was deleted.

126 changes: 0 additions & 126 deletions docs/docs/building-blocks/3-modules.md

This file was deleted.

128 changes: 0 additions & 128 deletions docs/docs/building-blocks/6-optimizers.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/building-blocks/_category_.json

This file was deleted.

3 changes: 3 additions & 0 deletions docs/docs/deep-dive/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ sidebar_position: 7

# DSPy Assertions

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


Language models (LMs) have transformed how we interact with machine learning, offering vast capabilities in natural language understanding and generation. However, ensuring these models adhere to domain-specific constraints remains a challenge. Despite the growth of techniques like fine-tuning or “prompt engineering”, these approaches are extremely tedious and rely on heavy, manual hand-waving to guide the LMs in adhering to specific constraints. Even DSPy's modularity of programming prompting pipelines lacks mechanisms to effectively and automatically enforce these constraints.

To address this, we introduce DSPy Assertions, a feature within the DSPy framework designed to automate the enforcement of computational constraints on LMs. DSPy Assertions empower developers to guide LMs towards desired outcomes with minimal manual intervention, enhancing the reliability, predictability, and correctness of LM outputs.
Expand Down
1 change: 1 addition & 0 deletions docs/docs/deep-dive/data-handling/built-in-datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
sidebar_position: 2
---

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

# Utilizing Built-in Datasets

Expand Down
1 change: 1 addition & 0 deletions docs/docs/deep-dive/data-handling/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
sidebar_position: 1
---

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

# Examples in DSPy

Expand Down
2 changes: 2 additions & 0 deletions docs/docs/deep-dive/data-handling/loading-custom-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
sidebar_position: 3
---

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

# Creating a Custom Dataset

We've seen how to work with with `Example` objects and use the `HotPotQA` class to load the HuggingFace HotPotQA dataset as a list of `Example` objects. But in production, such structured datasets are rare. Instead, you'll find yourself working on a custom dataset and might question: how do I create my own dataset or what format should it be?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import AuthorDetails from '@site/src/components/AuthorDetails';

# HFClientTGI

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Prerequisites

Docker must be installed on your system. If you don't have Docker installed, you can get it from [here](https://docs.docker.com/get-docker/).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# HFClient vLLM

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Prerequisites

Follow these steps to set up the vLLM Server:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# LlamaCpp

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Prerequisites

Install Llama Cpp Python by following the instructions provided in the [Llama Cpp Python repository](https://github.com/abetlen/llama-cpp-python).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChatModuleClient

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Prerequisites

1. Install the required packages using the following commands:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OllamaLocal

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

!!! note
Adapted from documentation provided by https://github.com/insop

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TensorRTModel

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

TensorRT LLM by Nvidia happens to be one of the most optimized inference engines to run open-source Large Language Models locally or in production.

### Prerequisites
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/deep-dive/modules/chain-of-thought-with-hint.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sidebar_position: 2

# ChainOfThoughtWithHint

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"

This class builds upon the `ChainOfThought` class by introducing an additional input field to provide hints for reasoning. The inclusion of a hint allows for a more directed problem-solving process, which can be especially useful in complex scenarios.


Expand Down
3 changes: 3 additions & 0 deletions docs/docs/deep-dive/modules/chain-of-thought.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dspy.ChainOfThought

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


### Constructor

The constructor initializes the `ChainOfThought` class and sets up its attributes. It inherits from the `Predict` class and adds specific functionality for chain of thought processing.
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/deep-dive/modules/guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# DSPy Modules

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


[<img align="center" src="https://colab.research.google.com/assets/colab-badge.svg" />](https://colab.research.google.com/github/stanfordnlp/dspy/blob/main/docs/guides/modules.ipynb)

## Quick Recap
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/deep-dive/modules/multi-chain-comparison.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dspy.MultiChainComparison

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Constructor

The constructor initializes the `MultiChainComparison` class and sets up its attributes. It inherits from the `Predict` class and adds specific functionality for multiple chain comparisons.
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/deep-dive/modules/predict.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dspy.Predict

!!! warning "This page is outdated and may not be fully accurate in DSPy 2.5"


## Constructor

The constructor initializes the `Predict` class and sets up its attributes, taking in the `signature` and additional config options. If the `signature` is a string, it processes the input and output fields, generates instructions, and creates a template for the specified `signature` type.
Expand Down
Loading

0 comments on commit 5ebf2f7

Please sign in to comment.