Skip to content

Commit 33817ee

Browse files
authored
docs: add refferences (#177)
added autodoc and reference section cards to most pages
1 parent e498420 commit 33817ee

File tree

22 files changed

+220
-72
lines changed

22 files changed

+220
-72
lines changed

.readthedocs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ sphinx:
1919
# fail_on_warning: true
2020

2121
python:
22-
install:
23-
- requirements: ./requirements/docs.txt
22+
install:
23+
- method: pip
24+
path: .
25+
extra_requirements:
26+
- docs

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ test-e2e: ## Run end2end tests
3939
docs-site: ## Build and serve documentation
4040
@sphinx-build -nW --keep-going -j 4 -b html $(GIT_ROOT)/docs/ $(GIT_ROOT)/docs/_build/html
4141
@python -m http.server --directory $(GIT_ROOT)/docs/_build/html
42-
4342
watch-docs: ## Build and watch documentation
4443
sphinx-autobuild docs docs/_build/html --watch $(GIT_ROOT)/src/ --ignore ".ipynb"

docs/concepts/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
(core-concepts)=
12
# Core Concepts
2-
Core concepts that drives Ragas
3-
4-
5-
```{toctree}
3+
:::{toctree}
64
:caption: Concepts
75
:hidden:
86

97
metrics_driven
108
metrics/index
119
testset_generation
1210
feedback
11+
:::
1312

14-
```
13+
Ragas is using

docs/conf.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Configuration file for the Sphinx documentation builder.
2-
#
3-
# For the full list of built-in configuration values, see the documentation:
4-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
1+
import os
2+
from dataclasses import asdict
3+
4+
from sphinxawesome_theme import ThemeOptions
55

66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@@ -11,23 +11,36 @@
1111
author = "ExplodingGradients"
1212
release = "0.0.16"
1313

14-
1514
# -- General configuration ---------------------------------------------------
1615
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1716

17+
html_title = "Ragas"
18+
html_theme = "sphinxawesome_theme"
19+
html_static_path = ["_static"]
20+
html_css_files = ["css/ragas.css"]
21+
html_favicon = "./_static/favicon.ico"
22+
1823
extensions = [
24+
"sphinx.ext.doctest",
25+
"sphinx.ext.autodoc",
26+
"sphinx.ext.napoleon",
27+
"sphinx.ext.autosummary",
28+
"sphinxawesome_theme.highlighting",
29+
"sphinxawesome_theme.docsearch",
1930
"myst_parser",
2031
"sphinx_design",
21-
# "myst_parser",
22-
"sphinxawesome_theme.highlighting",
23-
# "sphinxawesome_theme.docsearch",
2432
]
25-
source_suffix = [".rst", ".md"]
2633

34+
source_suffix = [".rst", ".md"]
2735
templates_path = ["_templates"]
2836
exclude_patterns = []
2937
myst_number_code_blocks = ["typescript"]
3038

39+
# algolia search
40+
docsearch_app_id = os.getenv("DOCSEARCH_APP_ID")
41+
docsearch_api_key = os.getenv("DOCSEARCH_API_KEY")
42+
docsearch_index_name = os.getenv("DOCSEARCH_INDEX_NAME")
43+
3144
# -- Options for HTML output -------------------------------------------------
3245
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3346

@@ -50,24 +63,13 @@
5063
# "attrs_block",
5164
]
5265

53-
html_title = "Ragas"
54-
html_theme = "sphinxawesome_theme"
55-
html_static_path = ["_static"]
56-
html_css_files = ["css/ragas.css"]
57-
html_favicon = "./_static/favicon.ico"
58-
59-
60-
from dataclasses import asdict
61-
62-
from sphinxawesome_theme import ThemeOptions
63-
6466
theme_options = ThemeOptions(
6567
logo_light="./_static/imgs/ragas-logo.png",
6668
logo_dark="./_static/imgs/ragas-logo.png",
6769
extra_header_link_icons={
6870
"discord": {
6971
"link": "https://discord.gg/5djav8GGNZ",
70-
"icon": """<svg height="26px" style="margin-right: 3px; display: inline" viewBox="0 0 22 22" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenod" clip-rule="evenod" d="M18.59 5.88997C17.36 5.31997 16.05 4.89997 14.67 4.65997C14.5 4.95997 14.3 5.36997 14.17 5.69997C12.71 5.47997 11.26 5.47997 9.83001 5.69997C9.69001 5.36997 9.49001 4.95997 9.32001 4.65997C7.94001 4.89997 6.63001 5.31997 5.40001 5.88997C2.92001 9.62997 2.25001 13.28 2.58001 16.87C4.23001 18.1 5.82001 18.84 7.39001 19.33C7.78001 18.8 8.12001 18.23 8.42001 17.64C7.85001 17.43 7.31001 17.16 6.80001 16.85C6.94001 16.75 7.07001 16.64 7.20001 16.54C10.33 18 13.72 18 16.81 16.54C16.94 16.65 17.07 16.75 17.21 16.85C16.7 17.16 16.15 17.42 15.59 17.64C15.89 18.23 16.23 18.8 16.62 19.33C18.19 18.84 19.79 18.1 21.43 16.87C21.82 12.7 20.76 9.08997 18.61 5.88997H18.59ZM8.84001 14.67C7.90001 14.67 7.13001 13.8 7.13001 12.73C7.13001 11.66 7.88001 10.79 8.84001 10.79C9.80001 10.79 10.56 11.66 10.55 12.73C10.55 13.79 9.80001 14.67 8.84001 14.67ZM15.15 14.67C14.21 14.67 13.44 13.8 13.44 12.73C13.44 11.66 14.19 10.79 15.15 10.79C16.11 10.79 16.87 11.66 16.86 12.73C16.86 13.79 16.11 14.67 15.15 14.67Z" fill="currentColor"/></svg>""",
72+
"icon": """<svg height="26px" style="margin-right: 3px; display: inline" viewBox="0 0 22 22" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenod" clip-rule="evenod" d="M18.59 5.88997C17.36 5.31997 16.05 4.89997 14.67 4.65997C14.5 4.95997 14.3 5.36997 14.17 5.69997C12.71 5.47997 11.26 5.47997 9.83001 5.69997C9.69001 5.36997 9.49001 4.95997 9.32001 4.65997C7.94001 4.89997 6.63001 5.31997 5.40001 5.88997C2.92001 9.62997 2.25001 13.28 2.58001 16.87C4.23001 18.1 5.82001 18.84 7.39001 19.33C7.78001 18.8 8.12001 18.23 8.42001 17.64C7.85001 17.43 7.31001 17.16 6.80001 16.85C6.94001 16.75 7.07001 16.64 7.20001 16.54C10.33 18 13.72 18 16.81 16.54C16.94 16.65 17.07 16.75 17.21 16.85C16.7 17.16 16.15 17.42 15.59 17.64C15.89 18.23 16.23 18.8 16.62 19.33C18.19 18.84 19.79 18.1 21.43 16.87C21.82 12.7 20.76 9.08997 18.61 5.88997H18.59ZM8.84001 14.67C7.90001 14.67 7.13001 13.8 7.13001 12.73C7.13001 11.66 7.88001 10.79 8.84001 10.79C9.80001 10.79 10.56 11.66 10.55 12.73C10.55 13.79 9.80001 14.67 8.84001 14.67ZM15.15 14.67C14.21 14.67 13.44 13.8 13.44 12.73C13.44 11.66 14.19 10.79 15.15 10.79C16.11 10.79 16.87 11.66 16.86 12.73C16.86 13.79 16.11 14.67 15.15 14.67Z" fill="currentColor"/></svg>""", # noqa
7173
},
7274
"github": {
7375
"link": "https://github.com/explodinggradients/ragas",
@@ -102,4 +104,4 @@
102104
html_theme_options = asdict(theme_options)
103105

104106
# -- Myst NB Config -------------------------------------------------
105-
nb_execution_mode = "auto"
107+
nb_execution_mode = "off"

docs/getstarted/evaluation.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
---
2-
file_format: mystnb
3-
kernelspec:
4-
name: python3
5-
execution:
6-
timeout: 300
7-
---
8-
9-
(heading-target)=
1+
(get-started-evaluation)=
102
# Evaluation
113

124
welcome to the ragas quickstart. We're going to get you up and running with ragas as quickly as you can so that you can go back to improving your Retrieval Augmented Generation pipelines while this library makes sure your changes are improving your entire pipeline.

docs/getstarted/index.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,49 @@
1+
(get-started)=
12
# Get Started
23

3-
```{toctree}
4+
:::{toctree}
45
:maxdepth: 1
6+
:hidden:
57
install.md
68
evaluation.md
79
testset_generation.md
810
monitoring.md
9-
```
11+
:::
12+
13+
Welcome to the Ragas tutorials! These begineer-friendly tutorials will guide you
14+
through the fundamentals of working with Ragas. These tutorials do assume basic
15+
knowledge of Python and Retrieval Augmented Generation (RAG) pipelines.
16+
17+
Before you go further make sure you have [Ragas installed](./install.md)!
18+
19+
:::{note}
20+
The tutorials only give you on overview of what you can do with ragas and the
21+
basic skill you need to use it. If you want an in-depth explaination of the
22+
core-concepts behind Ragas, check out the [Core Concepts](../concepts/index.md) page. You can also checkout the [How-to Guides](../howtos/index.md) if you want to specific applications of Ragas.
23+
:::
24+
25+
26+
If you have any questions about Ragas, feel free to join and ask in the
27+
`#questions` channel in our discord community ❤ .
28+
29+
Let’s get started! 🏁
30+
31+
:::{card} Ragas Metrics and Evaluation
32+
:link: get-started-evaluation
33+
:link-type: ref
34+
35+
How to use the Ragas Metrics to evaluate your RAG pipelines.
36+
:::
37+
38+
:::{card} Synthetic Testset Generation
39+
:link: get-started-testset-generation
40+
:link-type: ref
41+
42+
How to generate testset to assess your RAG pipelines
43+
:::
44+
:::{card} Monitoring
45+
:link: get-started-monitoring
46+
:link-type: ref
47+
48+
How to monitor your RAG systems in production.
49+
:::

docs/getstarted/monitoring.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(get-started-monitoring)=
12
# Monitoring
23

34
Maintaining the quality and performance of an LLM application in a production environment can be challenging. Ragas provides a solution through production quality monitoring, offering valuable insights into your application's performance. This is achieved by constructing custom, smaller, more cost-effective, and faster models.
@@ -31,4 +32,4 @@ This feature helps in detecting and quantifying responses with incorrect formatt
3132
```{admonition} **Custom use-case**
3233
:class: hint
3334
34-
For monitoring other critical aspects that are specific to your use case. [Talk to founders](https://calendly.com/shahules/30min)
35+
For monitoring other critical aspects that are specific to your use case. [Talk to founders](https://calendly.com/shahules/30min)

docs/getstarted/testset_generation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(get-started-testset-generation)=
12
# Synthetic test data generation
23

34
This tutorial is designed to help you create a synthetic evaluation dataset for assessing your RAG pipeline. To achieve this, we will utilize open-ai models, so please ensure you have your OpenAI API key ready and accessible within your environment.
@@ -45,4 +46,4 @@ testset.to_pandas()
4546
```
4647
<p align="left">
4748
<img src="../_static/imgs/testset_output.png" alt="test-outputs" width="800" height="600" />
48-
</p>
49+
</p>

docs/getstarted/testsetgeneration.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"outputs": [],
5252
"source": [
5353
"import os\n",
54+
"\n",
5455
"os.environ[\"OPENAI_API_KEY\"] = \"your-openai-key\""
5556
]
5657
},
@@ -72,7 +73,7 @@
7273
"source": [
7374
"import json\n",
7475
"from llama_index import download_loader\n",
75-
"from ragas.testset import TestsetGenerator\n"
76+
"from ragas.testset import TestsetGenerator"
7677
]
7778
},
7879
{

docs/howtos/index.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1+
(how-to-guides)=
12
# How-to Guides
23

34

4-
```{toctree}
5-
:caption: How-to Guides
6-
:hidden:
5+
The how-to guides offer a more comprehensive overview of all the tools Ragas
6+
offers and how to use them. This will help you tackle messier real-world
7+
usecases when you're using the framework to help build your own RAG pipelines.
8+
9+
The guides assume you are familiar and confortable with the Ragas basics. If
10+
your not feel free to checkout the [Get Started](../getstarted/index.md)
11+
sections first.
12+
13+
These guides are organized into 3 sections
14+
15+
- [Customisations](): How to customise Ragas to use with your system. Things
16+
like changing the LLMs used underneath are covered here.
17+
- [Applications](): Shows how to leverage Ragas framework to solve various
18+
real-world problems that you might be facing too.
19+
- [Integrations](): Integrations with other tools like langchain and llamaindex,
20+
making it super easy to add ragas into your setup.
21+
22+
You can check the entire list bellow 👇
23+
24+
**Index**
25+
:::{toctree}
726

827
applications/index
928

10-
```
29+
:::

0 commit comments

Comments
 (0)