Skip to content

Commit f6034f1

Browse files
authored
docs: support notebooks (explodinggradients#182)
1 parent 33817ee commit f6034f1

22 files changed

+160
-1040
lines changed

.readthedocs.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ sphinx:
2020

2121
python:
2222
install:
23+
- requirements: ./requirements/docs.txt
2324
- method: pip
2425
path: .
25-
extra_requirements:
26-
- docs

docs/_static/css/ragas.css

+53-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,65 @@
1-
/* Make pandas tables look correct in dark-mode */
2-
div.cell_output table {
3-
color: var(--color-content-foreground);
1+
/* Base Theme */
2+
div.cell_input {
3+
background: var(--background) !important;
44
}
55

6-
div.cell_output table {
7-
margin: auto;
6+
.cell_output .output.text_plain,
7+
.cell_output .output.stream {
8+
background: var(--background);
9+
border: 1px solid grey;
10+
border-radius: var(--mystnb-source-border-radius);
811
}
912

10-
div.cell_output tbody tr:nth-child(odd):not(:hover) {
11-
background: var(--color-table-header-background);
13+
.cell_output .output.stderr {
14+
background: var(--background);
15+
border: 1px solid #fbc7c7;
16+
border-radius: var(--mystnb-source-border-radius);
17+
}
18+
19+
.cell_output .output.traceback {
20+
background: var(--background);
21+
border: 1px solid #fbc7c7;
22+
border-radius: var(--mystnb-source-border-radius);
23+
}
24+
25+
/* Pandas tables. Pulled from the Jupyter / nbsphinx CSS */
26+
div.cell_output table {
27+
display: block;
28+
overflow-x: auto;
29+
white-space: nowrap;
30+
border: none;
31+
border-collapse: collapse;
32+
border-spacing: 0;
33+
color: var(--foreground);
34+
font-size: 1em;
35+
table-layout: fixed;
1236
}
1337

1438
div.cell_output thead {
15-
border-bottom-color: var(--color-code-foreground);
39+
border-bottom: 1px solid black;
40+
vertical-align: bottom;
1641
}
1742

18-
div.cell_input {
19-
display: none;
43+
div.cell_output tr,
44+
div.cell_output th,
45+
div.cell_output td {
46+
text-align: right;
47+
vertical-align: middle;
48+
padding: 0.5em 0.5em;
49+
line-height: normal;
50+
white-space: normal;
51+
max-width: none;
52+
border: none;
53+
}
54+
55+
div.cell_output th {
56+
font-weight: bold;
57+
}
58+
59+
div.cell_output tbody tr:nth-child(odd) {
60+
background: var(--backgound);
2061
}
2162

22-
.dark {
23-
background: var(--color-content-background);
24-
color: var(--color-content-foreground);
63+
div.cell_output tbody tr:hover {
64+
background: rgba(66, 165, 245, 0.2);
2565
}
File renamed without changes.
File renamed without changes.

docs/concepts/feedback.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
(user-feedback)=
12
# Utilizing User Feedback
23

34
User feedback can often be noisy and challenging to harness effectively. However, within the feedback, valuable signals exist that can be leveraged to iteratively enhance your LLM and RAG applications. These signals have the potential to be amplified effectively, aiding in the detection of specific issues within the pipeline and preventing recurring errors. Ragas is equipped to assist you in the analysis of user feedback data, enabling the discovery of patterns and making it a valuable resource for continual improvement.
45

5-
[Talk to founders](https://calendly.com/shahules/30min) to add this to your LLM app building cycle.
6+
[Talk to founders](https://calendly.com/shahules/30min) to add this to your LLM app building cycle.

docs/concepts/index.md

+53-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,56 @@ testset_generation
1010
feedback
1111
:::
1212

13-
Ragas is using
13+
Ragas aims to create an open standard, providing devs with the tools and techniques to leverage continual learning in their RAG applications. With Ragas, you would be able to
14+
15+
1. Synthetically generate a diverse test dataset that you can use to evaluate your app.
16+
2. use advanced metrics we built to measure how your app performs.
17+
3. help monitor your apps in production with custom models and see if there are any discrepancies.
18+
4. bring up those discrepancies and build new datasets so that you can test and refine your app further to solve them.
19+
20+
(what-is-rag)=
21+
:::{dropdown} what is RAG and continual learning?
22+
```{rubric} RAG
23+
```
24+
25+
Retrieval Augmented Generation (RAG) is a natural language processing (NLP) technique that combines the strengths of retrieval- and generative-based artificial intelligence (AI) models.
26+
RAG uses an information retrieval system to provide data to a Large Language Model (LLM).
27+
RAG models first use a retriever to identify a set of relevant documents from a knowledge base.
28+
RAG can provide more accurate results to queries than a generative LLM on its own because RAG uses knowledge external to data already contained in the LLM.
29+
30+
```{rubric} Continual Learning
31+
```
32+
33+
With continual learning, models continuously learn and evolve based on the input of increasing amounts of data while retaining previously-learned knowledge. The goal is to develop autonomous agents that can learn continuously and adaptively to develop skills necessary for performing more complex tasks without forgetting what has been learned before.
34+
35+
The goal of continual learning is to:
36+
- Use data that is coming in to automatically retrain the model
37+
- Gain high accuracy and retain high performing models
38+
:::
39+
40+
::::{grid} 2
41+
42+
:::{grid-item-card} Metrics Driven Development
43+
:link: mdd
44+
:link-type: ref
45+
What is MDD?
46+
:::
47+
48+
:::{grid-item-card} Ragas Metrics
49+
:link: ragas-metrics
50+
:link-type: ref
51+
What metrics are available? How do they work?
52+
:::
53+
54+
:::{grid-item-card} Synthetic Test Data Generation
55+
:link: testset-generation
56+
:link-type: ref
57+
How to create more datasets to test on?
58+
:::
59+
60+
:::{grid-item-card} Utilizing User Feedback
61+
:link: user-feedback
62+
:link-type: ref
63+
How to leverage the signals from user to improve?
64+
:::
65+
::::

docs/concepts/metrics/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(ragas-metrics)=
12
# Metrics
23

34
## Component-Wise Evaluation
@@ -32,4 +33,4 @@ semantic_similarity
3233
answer_correctness
3334
critique
3435
35-
```
36+
```

docs/concepts/metrics_driven.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(mdd)=
12
# Metrics-Driven Development
23

34
While creating a fundamental LLM application may be straightforward, the challenge lies in its ongoing maintenance and continuous enhancement. Ragas' vision is to facilitate the continuous improvement of LLM and RAG applications by embracing the ideology of Metrics-Driven Development (MDD).
@@ -8,4 +9,4 @@ Our mission is to establish an open-source standard for applying MDD to LLM and
89

910
- [**Evaluation**](../getstarted/evaluation.md): This enables you to assess LLM applications and conduct experiments in a metric-assisted manner, ensuring high dependability and reproducibility.
1011

11-
- [**Monitoring**](../getstarted/monitoring.md): It allows you to gain valuable and actionable insights from production data points, facilitating the continuous improvement of the quality of your LLM application.
12+
- [**Monitoring**](../getstarted/monitoring.md): It allows you to gain valuable and actionable insights from production data points, facilitating the continuous improvement of the quality of your LLM application.

docs/concepts/testset_generation.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Synthetic Data generation
1+
(testset-generation)=
2+
# Synthetic Test Data generation
23

34
## Why synthetic test data?
45

@@ -100,4 +101,4 @@ g.set_title("Question type distribution",fontdict = { 'fontsize': 20})
100101

101102
<p align="left">
102103
<img src="../_static/imgs/question_types.png" alt="test-outputs" width="450" height="400" />
103-
</p>
104+
</p>

docs/conf.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44
from sphinxawesome_theme import ThemeOptions
55

6+
from ragas import __version__
7+
68
# -- Project information -----------------------------------------------------
79
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
810

911
project = "ragas"
1012
copyright = "2023, ExplodingGradients"
1113
author = "ExplodingGradients"
1214
release = "0.0.16"
15+
print("RAGAS VERSION", __version__)
1316

1417
# -- General configuration ---------------------------------------------------
1518
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -25,15 +28,15 @@
2528
"sphinx.ext.autodoc",
2629
"sphinx.ext.napoleon",
2730
"sphinx.ext.autosummary",
31+
"sphinx_design",
2832
"sphinxawesome_theme.highlighting",
2933
"sphinxawesome_theme.docsearch",
30-
"myst_parser",
31-
"sphinx_design",
34+
"myst_nb",
3235
]
3336

3437
source_suffix = [".rst", ".md"]
3538
templates_path = ["_templates"]
36-
exclude_patterns = []
39+
exclude_patterns = ["_build"]
3740
myst_number_code_blocks = ["typescript"]
3841

3942
# algolia search
@@ -105,3 +108,4 @@
105108

106109
# -- Myst NB Config -------------------------------------------------
107110
nb_execution_mode = "off"
111+
nb_execute_in_temp = True

0 commit comments

Comments
 (0)