Skip to content

Commit

Permalink
feat: Adds exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
jermnelson committed Sep 22, 2024
1 parent b4fd33b commit a30d3a2
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 1 deletion.
5 changes: 5 additions & 0 deletions exploring-llms/chatgpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ <h2>Using ChatGPT</h2>
or to use the ChatGPT
<a href="https://platform.openai.com/docs/api-reference">API</a>, you will need to
sign up for an account. </p>
<h3>Workshop Exercise</h3>
<p>Ask ChatGPT to create a three task Airflow DAG using the Taskflow API decorators in Python:
- <strong>First task</strong>: Query FOLIO using an HTTP FOLIO Connection
- <strong>Second task</strong>: Extract and update {property-related-to-a-use-case} using JSON Path
- <strong>Third task</strong>: POST the new JSON back to FOLIO using the HTTP Connection</p>
<h2>GPTs</h2>
<p>OpenAI offers custom versions of ChatGPT that are available for use at <a href="https://chatgpt.com/gpts">https://chatgpt.com/gpts</a>.
These GPTs often use custom prompts along with text and image collections using
Expand Down
7 changes: 7 additions & 0 deletions exploring-llms/chatgpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ To use ChatGPT, you can visit [https://chatgpt.com][CHATGPT] to access either th
[API](https://platform.openai.com/docs/api-reference), you will need to
sign up for an account.

### Workshop Exercise
Ask ChatGPT to create a three task Airflow DAG using the Taskflow API decorators in Python:
- **First task**: Query FOLIO using an HTTP FOLIO Connection
- **Second task**: Extract and update {property-related-to-a-use-case} using JSON Path
- **Third task**: POST the new JSON back to FOLIO using the HTTP Connection


## GPTs
OpenAI offers custom versions of ChatGPT that are available for use at [https://chatgpt.com/gpts](https://chatgpt.com/gpts).
These GPTs often use custom prompts along with text and image collections using
Expand Down
3 changes: 3 additions & 0 deletions exploring-llms/claude.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ <h2>Using Claude</h2>
<p>To use Claude for free, you will need to sign up for an account on the <a href="https://www.anthropic.com/">Anthropic</a> website.
Even with a free account, you will need to purchase credits to use
the <a href="https://www.anthropic.com/api">API</a>. </p>
<h2>Workshop Exercise</h2>
<p>Ask Claude to generate a Python FASTAPI function for a POST request that will trigger an Airflow
DAG run with a JSON payload. </p>
<div class="footnote">
<hr />
<ol>
Expand Down
4 changes: 4 additions & 0 deletions exploring-llms/claude.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ To use Claude for free, you will need to sign up for an account on the [Anthropi
Even with a free account, you will need to purchase credits to use
the [API](https://www.anthropic.com/api).

## Workshop Exercise
Ask Claude to generate a Python FASTAPI function for a POST request that will trigger an Airflow
DAG run with a JSON payload.

[^CLAUDE]: [Introducing the next generation of Claude](https://www.anthropic.com/news/claude-3-family)

[ANTH]: https://www.anthropic.com/
Binary file added exploring-llms/folio-docs.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions exploring-llms/gemini.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ <h2>Using Gemini</h2>
<p>Gemini can be used through a <a href="https://gemini.google.com/">web interface</a> or programmatically through the Gemini
<a href="https://ai.google.dev/gemini-api">API</a>. Google provides Python, Go, Node.js, Web, Dart,
Swift, and Android libraries that wrap the API calls.<sup id="fnref:LANG_LIBS"><a class="footnote-ref" href="#fn:LANG_LIBS">5</a></sup></p>
<h2>Workshop Exercise</h2>
<p>Create a Github issue for a DSPy model signature of a FOLIO Circulation Record </p>
<div class="footnote">
<hr />
<ol>
Expand Down
3 changes: 3 additions & 0 deletions exploring-llms/gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Gemini can be used through a [web interface][GEMINI] or programmatically through
[API](https://ai.google.dev/gemini-api). Google provides Python, Go, Node.js, Web, Dart,
Swift, and Android libraries that wrap the API calls.[^LANG_LIBS]

## Workshop Exercise
Create a Github issue for a DSPy model signature of a FOLIO Circulation Record

[^GEMINI_PEOPLE]: [Why Google’s AI tool was slammed for showing images of people of colour](https://www.aljazeera.com/news/2024/3/9/why-google-gemini-wont-show-you-white-people)
[^1.5FLASH]: [Gemini 1.5 Flash](https://ai.google.dev/gemini-api/docs/models/gemini#gemini-1.5-flash)
[^1.5PRO]: [Gemini 1.5 Pro](https://ai.google.dev/gemini-api/docs/models/gemini#gemini-1.5-pro)
Expand Down
1 change: 0 additions & 1 deletion exploring-llms/local-llama.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ administrative rights on your local laptop), please download and install [gpt4al

A nice feature of [gpt4all][GPT4ALL], is that you can use a locally running LLM without an internet connection.
This also means that you can restrict access when using RAG on sensitive or private documentation.


## Using Llama.cpp
The [LLaMA.cpp][LLAMA.CCP] project allows you to run fine-tuned
Expand Down
10 changes: 10 additions & 0 deletions exploring-llms/retrieval-augmented-generation.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ <h2>Application to FOLIO</h2>
AI workflows; both in the generative aspects of creating new documents
like invoices or inventory records from text or automatic prompts, and
minimize errors in the LLMs output. </p>
<h2>Workshop Exercise</h2>
<ol>
<li>Download the following <a href="folio-docs.zip">zip file</a> and extract to a local directory named <em>folio-docs</em></li>
<li>Open <a href="https://gpt4all.io/">gpt4all</a></li>
<li>Click on the <strong>LocalDocs</strong> button on left-hand side</li>
<li>In the upper-right corner select the green button, <strong>+ Add Collection</strong></li>
<li>Name the new collection and browse to the <em>folio-docs</em> folder you created in step 1</li>
<li>Create collection</li>
<li>Create a new Chat and select the collection to query the model using RAG</li>
</ol>
<div class="footnote">
<hr />
<ol>
Expand Down
9 changes: 9 additions & 0 deletions exploring-llms/retrieval-augmented-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ AI workflows; both in the generative aspects of creating new documents
like invoices or inventory records from text or automatic prompts, and
minimize errors in the LLMs output.

## Workshop Exercise
1. Download the following [zip file](folio-docs.zip) and extract to a local directory named *folio-docs*
1. Open [gpt4all][GPT4ALL]
1. Click on the **LocalDocs** button on left-hand side
1. In the upper-right corner select the green button, **+ Add Collection**
1. Name the new collection and browse to the *folio-docs* folder you created in step 1
1. Create collection
1. Create a new Chat and select the collection to query the model using RAG

[GPT4ALL]: https://gpt4all.io/
[^RAG_NLP]: [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401)
[^GUIDE_RAG]: [A Simple Guide To Retrieval Augmented Generation Language Models](https://www.smashingmagazine.com/2024/01/guide-retrieval-augmented-generation-language-models/)

0 comments on commit a30d3a2

Please sign in to comment.