Skip to content

Commit

Permalink
Document how to use Tilebox with LLMs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbindreiter committed Nov 14, 2024
1 parent 3bd2ff2 commit 35a7198
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 9 deletions.
49 changes: 49 additions & 0 deletions ai-assistance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: AI Assistance
description: LLMS are a powerful tool for exploring and learning tools such as Tilebox. This section covers how to easily provide them with Tilebox specific context to get tailored and up-to-date responses.
icon: brain-circuit
---

## Providing Tilebox specific context

AI Assistants and Large Language Models (LLMS) can help you answer questions and provide guidance on how to use Tilebox, give you hints about relevant sections in the docs related to your questions and even help you creating your first workflows.

<Card title="Download Documentation for LLMs" icon="brain-circuit" href="https://docs.tilebox.com/llms-full.txt" horizontal>
Download the complete Tilebox Documentation as a plain text file to provide it to your AI assistant or large language model.
</Card>

The full content of the Tilebox Documentation is available in plain markdown format at [https://docs.tilebox.com/llms-full.txt](https://docs.tilebox.com/llms-full.txt). Upload this document to an AI Assistant or a large language models to provide Tilebox specific context.

<Tip>
The [Documentation Context](https://docs.tilebox.com/llms-full.txt) is always updated when the documentation changes. In case you download it, refresh it from time to time to also always stay up to date.
</Tip>

## Example prompt

After you have uploaded the [Documentation Context](https://docs.tilebox.com/llms-full.txt) to your AI assistant or large language model, you can now prompt it with questions and get tailored and up-to-date responses.

Below prompt is an example of how your AI assistant can help you get started with Tilebox.

```txt Example prompt
Generate a script that
- Creates a cluster
- Configures console logging
- Contains a Fibonacci calculator workflow that is using a local filesystem cache.
Make sure you get task dependencies right.
Make sure to only print the final result as the last step of the workflow.
Write logs to let us know what is happening.
- Submits a job for the number 7
- Starts a processing runner
Do not invent APIs. All available Tilebox APIs are documented.
```

## Claude

[Claude 3.5 Sonnet](https://docs.anthropic.com/en/docs/about-claude/models) is a great choice for an AI assistant to get started with Tilebox. To provide it with Tilebox specific context, create a [new project](https://support.anthropic.com/en/articles/9517075-what-are-projects), and then upload the [llms-full.txt](https://docs.tilebox.com/llms-full.txt) as project knowledge.
You can then prompt it with questions or use it to generate scripts. Check out the [example prompt](#example-prompt) to get started.

## ChatGPT

Experiments with [GPT-4o](https://chatgpt.com/?model=gpt-4o) have lead to mixed results so far. It worked well for answering questions, but it struggled to generate workflow scripts, often imagining APIs or using them in subtly wrong ways. You may want to consider using [Claude 3.5 Sonnet](#claude) instead.
2 changes: 1 addition & 1 deletion api-reference/workflows/creating-task-runner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: How to create a task runner
icon: list-check
---

From a [client instance](/workflows/creating) you can create a [TaskRunner](/workflows/concepts/task-runners), capable of executing tasks.
From a client instance you can create a [TaskRunner](/workflows/concepts/task-runners), capable of executing tasks.

<RequestExample>

Expand Down
2 changes: 1 addition & 1 deletion api-reference/workflows/submitting-job.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: How to submit a job
icon: diagram-project
---

To execute a workflow, you first need to submit a [job](/workflow/jobs) to the Tilebox API.
To execute a workflow, you first need to submit a [job](/workflows/concepts/jobs) to the Tilebox API.
This can be done by calling the `submit` method of a `JobClient` instance.

<RequestExample>
Expand Down
2 changes: 1 addition & 1 deletion api-reference/workflows/task-inputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: How to define task inputs
icon: laptop-code
---

A task can optionally define [input parameters](/workflow/tasks#input-parameters).
A task can optionally define [input parameters](/workflows/concepts/tasks#input-parameters).
These parameters are defined as class attributes, the same way as you would define a dataclass.

<RequestExample>
Expand Down
2 changes: 1 addition & 1 deletion datasets/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Here are some terms used throughout this section.

Prerequisites

- You've [installed](/sdks/python/installation) the `tilebox-datasets` package
- You've [installed](/sdks/python/install) the `tilebox-datasets` package
- You've [created](/authentication) a Tilebox API key

With the prerequisites out of the way, you can now create a client instance to start interacting with your Tilebox Datasets.
Expand Down
1 change: 1 addition & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"introduction",
"quickstart",
"console",
"ai-assistance",
"authentication"
]
},
Expand Down
1 change: 0 additions & 1 deletion vale/styles/write-good/TooWordy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ tokens:
- requirement
- reside
- residence
- retain
- satisfy
- shall
- should you wish
Expand Down
4 changes: 2 additions & 2 deletions workflows/concepts/clusters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Before registering a task runner, or submitting a job, you need to create a clus
clusters as needed. The following sections illustrates how to do this.

To manage clusters, you first need to instantiate a cluster client. You can do this by calling the `clusters` method on the
[workflows' client](/workflows/creating).
workflows' client.

<CodeGroup title="Instantiating a Clusters Client">
```python Python (Sync)
Expand Down Expand Up @@ -132,7 +132,7 @@ To delete a cluster, you can use the `delete` method and pass in a cluster's slu

## Jobs spanning different clusters

[When submitting a job](/workflows/job) you need to specify the cluster that the job should be submitted to.
[When submitting a job](/workflows/concepts/jobs) you need to specify the cluster that the job should be submitted to.
This allows you to target a specific group of task runners for a particular job. All sub-tasks within the job are
submitted to the same cluster by default. This can also be manually overridden to submit sub-tasks to other
clusters if needed. Check out the example below to see how this can be done.
Expand Down
4 changes: 2 additions & 2 deletions workflows/concepts/jobs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Once a job is submitted, its root task is scheduled for execution, and any [elig
may pick it up and execute it.

For submitting a job, a job client needs to be instantiated first. This can be done by calling the `jobs` method on the
[workflows' client](/workflows/creating).
workflows' client.

<CodeGroup>
```python Python (Sync)
Expand Down Expand Up @@ -115,7 +115,7 @@ and [dependencies](/workflows/concepts/tasks#dependencies), it's possible to vis
Assuming you have submitted a job, you can use the `display` method on the job client to display the execution of the job as a graph diagram.

<Note>
The `display` method is designed to be used in an [interactive environment](/sdks/python/jupyter), such as a Jupyter notebook.
The `display` method is designed to be used in an [interactive environment](/sdks/python/sample-notebooks#interactive-environments), such as a Jupyter notebook.
In non-interactive environments, use `job_client.visualize` instead which returns the rendered diagram as a string
in the SVG format.
</Note>
Expand Down

0 comments on commit 35a7198

Please sign in to comment.