Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sphinx docs #79

Merged
merged 10 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ unittests.cfg
package-lock.json

./api/.env
./api/gcp.json

./ui/.env

# Created by https://www.toptal.com/developers/gitignore/api/python
Expand Down Expand Up @@ -244,4 +242,8 @@ airflow/include/data/astronomer/registry/registry_cells.parquet
airflow/include/data/astronomer/registry/registry_dags.parquet
airflow/include/data/baseline_data_*.parquet
airflow/include/data/slack/troubleshooting.parquet


# GCP
api/gcp.json
api/application_default_credentials.json
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<br />

<p align="center">
<img src="static/logo.svg" />
<img src="_static/logo.svg" />
</p>

<br />
Expand All @@ -20,7 +20,7 @@ If you have any questions, feedback, or want to share similar use cases, reach o

## Data Retrieval & Embedding
<p align="center">
<img src="static/ingestion.png" />
<img src="_static/ingestion.png" />
</p>

In order to make the responses as factual and accurate as possible, it's generally best practice to use [Retrieval Augmented Generation (RAG)](https://proceedings.neurips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html). However, in order for RAG to be effective, a vector database needs to be populated with the most up-to-date and relevant information.
Expand All @@ -45,7 +45,7 @@ See the [Ingest README](https://github.com/astronomer/ask-astro/tree/main/airflo

## Prompt Orchestration
<p align="center">
<img src="static/prompt-orchestration.png" />
<img src="_static/prompt-orchestration.png" />
</p>

Ask Astro uses LangChain's `ConversationalRetrievalChain` to generate a response. This chain does the following:
Expand All @@ -60,7 +60,7 @@ This generally works well. For prompt rewording, we use `gpt-3.5-turbo`, which r

## Feedback Loops
<p align="center">
<img src="static/feedback-loops.png" />
<img src="_static/feedback-loops.png" />
</p>

Airflow is critical in improving model performance over time. Feedback on answers come from two places:
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "ask-astro"
copyright = "2023, astronomer.io" # noqa: A001
author = "astronomer.io"
release = "0.0.1"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
root_doc = "index"
extensions = ["myst_parser"]

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
25 changes: 25 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```{include} README.md
```

```{toctree}
:hidden:
:caption: 💻 Develop UI

ui/README.md
```

```{toctree}
:hidden:
:caption: 💻 Develop Backend Server

api/cloudbuild_and_run.md
api/google_firestore.md
api/setup_slack_bot.md
```

```{toctree}
:hidden:
:caption: 💻 Develop Airflow DAGs

airflow/README.md
```
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
File renamed without changes.
Loading