From 5e3ae6b1ee8d85f6180ff464e214d700e50c27fc Mon Sep 17 00:00:00 2001 From: "Aivin V. Solatorio" Date: Tue, 30 May 2023 22:39:07 -0400 Subject: [PATCH] Update the documentation structure Signed-off-by: Aivin V. Solatorio --- README.md | 11 ++++++++++- docs/_toc.yml | 14 ++++++++++---- .../setting-up-the-environment.ipynb} | 0 .../examples/indicators/{README => README.md} | 0 .../getting-started-with-the-wdi.ipynb} | 0 5 files changed, 20 insertions(+), 5 deletions(-) rename notebooks/examples/{Setting up the environment.ipynb => getting-started/setting-up-the-environment.ipynb} (100%) rename notebooks/examples/indicators/{README => README.md} (100%) rename notebooks/examples/indicators/{Getting started with the WDI.ipynb => wdi/getting-started-with-the-wdi.ipynb} (100%) diff --git a/README.md b/README.md index bf0cd8c..6bfa8da 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ LLM4Data is a Python library designed to facilitate the application of large language models (LLMs) and artificial intelligence for data and knowledge discovery. It is intended to empower users and organizations to discover and interact with development data in innovative ways through natural language. -This library contains a collection of discovery and data augmentation solutions for various data types including documents, indicators, microdata, geospatial data, and more. The current version of the library includes solutions for the WDI indicators. Additional solutions will be added in [future releases](#upcoming-features). +This library contains a collection of discovery and data augmentation solutions for various data types including documents, indicators, microdata, geospatial data, and more. The current version of the library includes solutions for the WDI indicators. Additional solutions will be added in [future releases](https://worldbank.github.io/llm4data/README.html#upcoming-features). Built around existing [metadata standards and schemas](https://mah0001.github.io/schema-guide/), users and organizations can benefit from LLMs to enhance data-driven applications, enabling natural language processing, text generation, and more with LLM4Data. The library serves as a bridge between LLMs and development data using open-sourced libraries, offering a seamless interface to leverage the capabilities of these powerful language models. @@ -22,6 +22,11 @@ Additional examples can be found [here](notebooks/examples/). ### Generate WDI API URL from a prompt +```{warning} +This example uses the OpenAI API. Before you proceed, make sure to set your API keys in the `.env` file. +``` + + ```python from llm4data.prompts.indicators import wdi @@ -50,6 +55,10 @@ The URL also includes the date range, format, and source of the data. The user c ### Generate SQL queries on WDI data from a prompt +```{warning} +Make sure you have set up your environment first. The example below requires a working database engine, e.g., postgresql. If you want to use SQLite, make sure to update the `.env` file and set the environment variables. +``` + While the WDI data can be loaded into a Pandas dataframe, it is not always practical to do so; for example, developing applications that can answer arbitrary data questions. The LLM4Data library includes an SQL interface to WDI data, allowing users to query the data using SQL. diff --git a/docs/_toc.yml b/docs/_toc.yml index 105382c..8f4daa3 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -2,11 +2,17 @@ format: jb-book root: README parts: - - caption: Setting up the environment + - caption: Getting started chapters: - - file: notebooks/examples/"Setting up the environment.ipynb" - - caption: Indicators + - file: notebooks/examples/getting-started/setting-up-the-environment.ipynb + - file: notebooks/examples/getting-started/openai-api.ipynb + - file: notebooks/examples/getting-started/setting-up-database.ipynb + sections: + - file: notebooks/examples/getting-started/setting-up-database-sqlite.ipynb + - file: notebooks/examples/getting-started/setting-up-database-postgresql.ipynb + - file: notebooks/examples/getting-started/setting-up-vectorstore.ipynb + - caption: Development Data chapters: - file: notebooks/examples/indicators/README sections: - - file: notebooks/examples/indicators/"Getting started with the WDI.ipynb" + - file: notebooks/examples/indicators/wdi/getting-started-with-the-wdi.ipynb diff --git a/notebooks/examples/Setting up the environment.ipynb b/notebooks/examples/getting-started/setting-up-the-environment.ipynb similarity index 100% rename from notebooks/examples/Setting up the environment.ipynb rename to notebooks/examples/getting-started/setting-up-the-environment.ipynb diff --git a/notebooks/examples/indicators/README b/notebooks/examples/indicators/README.md similarity index 100% rename from notebooks/examples/indicators/README rename to notebooks/examples/indicators/README.md diff --git a/notebooks/examples/indicators/Getting started with the WDI.ipynb b/notebooks/examples/indicators/wdi/getting-started-with-the-wdi.ipynb similarity index 100% rename from notebooks/examples/indicators/Getting started with the WDI.ipynb rename to notebooks/examples/indicators/wdi/getting-started-with-the-wdi.ipynb