Skip to content

Commit dc1ae5c

Browse files
authored
Merge pull request #475 from jupyter-naas/424-naas-module---push-image-url-to-storage-to-create-asset-url
feat: improve abi repo with scripts to generate docs onto + publish agents + tests
2 parents 1a4cfb5 + 27d19fc commit dc1ae5c

3,300 files changed

Lines changed: 13251 additions & 74111 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ lock: deps
5151

5252
path=tests/
5353
test: deps
54-
@ uv run python -m pytest -n 4 .
54+
@ uv run python -m pytest .
5555

5656
test-abi: deps
57-
@ uv run python -m pytest -n 4 lib
57+
@ uv run python -m pytest lib
5858

5959
q=''
6060
ftest: deps
61-
@ uv run python -m pytest -n 4 $(shell find lib src tests -name '*_test.py' -type f | fzf -q $(q)) $(args)
61+
@ uv run python -m pytest $(shell find lib src tests -name '*_test.py' -type f | fzf -q $(q)) $(args)
6262

6363
fmt: deps
6464
@ uvx ruff format
@@ -159,6 +159,14 @@ triplestore-prod-pull: deps
159159
@ echo "Pulling production triplestore..."
160160
@ docker compose run --rm --remove-orphans abi bash -c 'uv run --no-dev python scripts/triplestore_prod_pull.py'
161161

162+
docs-ontology: deps
163+
@ echo "Generating ontology documentation..."
164+
@ uv run python scripts/generate_docs.py
165+
166+
publish-remote-agents: deps
167+
@ echo "Publishing remote agents..."
168+
@ uv run python scripts/publish_remote_agents.py
169+
162170
clean:
163171
@echo "Cleaning up build artifacts..."
164172
rm -rf __pycache__ .pytest_cache build dist *.egg-info lib/.venv .venv
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Prompting Techniques
2+
3+
## Chain of Thought (CoT)
4+
5+
Chain of Thought prompting encourages the model to break down complex problems into step-by-step reasoning, making the thought process explicit and transparent.
6+
7+
**Structure:**
8+
- Present the problem
9+
- Request step-by-step thinking
10+
- Ask for explicit reasoning at each step
11+
- Conclude with the final answer
12+
13+
**Example:**
14+
```
15+
Problem: A store sells apples for $2 per pound and oranges for $3 per pound. If I buy 4 pounds of apples and 2 pounds of oranges, how much do I spend in total?
16+
17+
Let me think through this step by step:
18+
1. First, I'll calculate the cost of apples: 4 pounds × $2/pound = $8
19+
2. Next, I'll calculate the cost of oranges: 2 pounds × $3/pound = $6
20+
3. Finally, I'll add both costs together: $8 + $6 = $14
21+
22+
Therefore, the total cost is $14.
23+
```
24+
25+
**When to use:**
26+
- Complex mathematical problems
27+
- Multi-step reasoning tasks
28+
- Debugging logical errors
29+
- Planning and decision-making scenarios
30+
31+
## Few-Shot Learning
32+
33+
Few-Shot Learning provides the model with a few examples of the desired input-output pattern before presenting the actual task, helping establish the expected format and style.
34+
35+
**Structure:**
36+
- Provide 2-5 examples of input-output pairs
37+
- Maintain consistent formatting across examples
38+
- Present the actual task using the same format
39+
- Let the model infer the pattern
40+
41+
**Example:**
42+
```
43+
Task: Convert these sentences to a more professional tone.
44+
45+
Example 1:
46+
Input: "Hey, can you get back to me ASAP about this?"
47+
Output: "I would appreciate your prompt response regarding this matter."
48+
49+
Example 2:
50+
Input: "This is totally wrong and needs to be fixed right now."
51+
Output: "There appears to be an error that requires immediate attention."
52+
53+
Example 3:
54+
Input: "Thanks a bunch for helping me out with this stuff."
55+
Output: "Thank you for your assistance with these matters."
56+
57+
Now convert this sentence:
58+
Input: "Can you double-check this thing before we send it out?"
59+
Output: "Could you please review this document before distribution?"
60+
```
61+
62+
**When to use:**
63+
- Establishing specific output formats
64+
- Teaching new writing styles or tones
65+
- Pattern recognition tasks
66+
- Classification problems
67+
- When you need consistent formatting across responses
68+
69+
## ROC-T-TOC
70+
71+
**Structure:**
72+
- Role: Define who the agent is, their function and expertise (Example: 'Email summarizer assistant')
73+
- Objective: Clearly state the overall objective or goal to achieve/solve. Acts as the guiding star for all tasks
74+
- Context: Provide additional context and relevant background information
75+
- Tools: List available tools with their expected inputs and outputs
76+
- Tasks: Lay out clear step-by-step tasks the agent will execute
77+
- Operating Guidelines: Specify how the agent should execute each task. Include which tools to use. Define how to interact with users. Outline process steps
78+
- Constraints: Define rules. Specify expected formats. Outline off-topic areas

docs/ontology/foundry/enterprise_management_foundry/Entity/Continuant/Generically dependent continuant/Information content entity/Descriptive information content entity/Brand/Brand.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Conveys the identity, distinguishing characteristics, and reputation of a product or service offered by an organization, often associated with a name, term, design, symbol, or other feature.
77

88
### Examples
9-
- The brand "Apple" for consumer electronics
109
- The brand "Nike" for athletic apparel
10+
- The brand "Apple" for consumer electronics
1111

1212
### Aliases
1313
Not defined.
@@ -48,10 +48,12 @@ graph BT
4848
| Ontology | Label | Definition | Example | Domain | Range |
4949
|----------|-------|------------|---------|--------|-------|
5050
| abi | [is curated in foundry](http://ontology.naas.ai/abi/is_curated_in_foundry) | Relates a class to the foundry it is curated in. | The class cco:ont00001262 is curated in the foundry 'enterprise_management_foundry' and 'personal_ai_foundry'. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [string](http://www.w3.org/2001/XMLSchema#string) |
51+
| abi | [extracted at](http://ontology.naas.ai/abi/extracted_at) | The timestamp in ISO 8601 format when a generically dependent continuant was extracted or retrieved from its source. | 2025-06-05T12:00:00+00:00 | [generically dependent continuant](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Generically%20dependent%20continuant.md) | [dateTime](http://www.w3.org/2001/XMLSchema#dateTime) |
5152

5253
### Object Properties
5354
| Ontology | Label | Definition | Example | Domain | Range | Inverse Of |
5455
|----------|-------|------------|---------|--------|-------|------------|
56+
| abi | [has backing data source](http://ontology.naas.ai/abi/hasBackingDataSource) | Relates an entity to the data source that provides the underlying data for that entity. This property indicates the origin or source of the data that supports the entity. | A report entity may have a backing data source that provides the raw data used to generate the report. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [Data Source](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Data%20source/Data%20source.md) | []() |
5557
| bfo | [exists at](http://purl.obolibrary.org/obo/BFO_0000108) | (Elucidation) exists at is a relation between a particular and some temporal region at which the particular exists | First World War exists at 1914-1916; Mexico exists at January 1, 2000 | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [temporal region](/docs/ontology/reference/model/Entity/Occurrent/Temporal%20region/Temporal%20region.md) | []() |
5658
| bfo | [continuant part of](http://purl.obolibrary.org/obo/BFO_0000176) | b continuant part of c =Def b and c are continuants & there is some time t such that b and c exist at t & b continuant part of c at t | Milk teeth continuant part of human; surgically removed tumour continuant part of organism | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) |
5759
| bfo | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) | b has continuant part c =Def c continuant part of b | | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | []() |

docs/ontology/foundry/enterprise_management_foundry/Entity/Continuant/Generically dependent continuant/Information content entity/Descriptive information content entity/Market/Market segment/Market segment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ graph BT
5050
| Ontology | Label | Definition | Example | Domain | Range |
5151
|----------|-------|------------|---------|--------|-------|
5252
| abi | [is curated in foundry](http://ontology.naas.ai/abi/is_curated_in_foundry) | Relates a class to the foundry it is curated in. | The class cco:ont00001262 is curated in the foundry 'enterprise_management_foundry' and 'personal_ai_foundry'. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [string](http://www.w3.org/2001/XMLSchema#string) |
53+
| abi | [extracted at](http://ontology.naas.ai/abi/extracted_at) | The timestamp in ISO 8601 format when a generically dependent continuant was extracted or retrieved from its source. | 2025-06-05T12:00:00+00:00 | [generically dependent continuant](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Generically%20dependent%20continuant.md) | [dateTime](http://www.w3.org/2001/XMLSchema#dateTime) |
5354

5455
### Object Properties
5556
| Ontology | Label | Definition | Example | Domain | Range | Inverse Of |
5657
|----------|-------|------------|---------|--------|-------|------------|
58+
| abi | [has backing data source](http://ontology.naas.ai/abi/hasBackingDataSource) | Relates an entity to the data source that provides the underlying data for that entity. This property indicates the origin or source of the data that supports the entity. | A report entity may have a backing data source that provides the raw data used to generate the report. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [Data Source](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Data%20source/Data%20source.md) | []() |
5759
| bfo | [exists at](http://purl.obolibrary.org/obo/BFO_0000108) | (Elucidation) exists at is a relation between a particular and some temporal region at which the particular exists | First World War exists at 1914-1916; Mexico exists at January 1, 2000 | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [temporal region](/docs/ontology/reference/model/Entity/Occurrent/Temporal%20region/Temporal%20region.md) | []() |
5860
| bfo | [continuant part of](http://purl.obolibrary.org/obo/BFO_0000176) | b continuant part of c =Def b and c are continuants & there is some time t such that b and c exist at t & b continuant part of c at t | Milk teeth continuant part of human; surgically removed tumour continuant part of organism | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) |
5961
| bfo | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) | b has continuant part c =Def c continuant part of b | | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | []() |

docs/ontology/foundry/enterprise_management_foundry/Entity/Continuant/Generically dependent continuant/Information content entity/Descriptive information content entity/Market/Market.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
Represents the economic space where buyers and sellers interact to exchange goods, services, or information, typically characterized by supply and demand dynamics.
77

88
### Examples
9-
- The global oil market
109
- The technology market
10+
- The global oil market
1111

1212
### Aliases
1313
Not defined.
@@ -48,10 +48,12 @@ graph BT
4848
| Ontology | Label | Definition | Example | Domain | Range |
4949
|----------|-------|------------|---------|--------|-------|
5050
| abi | [is curated in foundry](http://ontology.naas.ai/abi/is_curated_in_foundry) | Relates a class to the foundry it is curated in. | The class cco:ont00001262 is curated in the foundry 'enterprise_management_foundry' and 'personal_ai_foundry'. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [string](http://www.w3.org/2001/XMLSchema#string) |
51+
| abi | [extracted at](http://ontology.naas.ai/abi/extracted_at) | The timestamp in ISO 8601 format when a generically dependent continuant was extracted or retrieved from its source. | 2025-06-05T12:00:00+00:00 | [generically dependent continuant](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Generically%20dependent%20continuant.md) | [dateTime](http://www.w3.org/2001/XMLSchema#dateTime) |
5152

5253
### Object Properties
5354
| Ontology | Label | Definition | Example | Domain | Range | Inverse Of |
5455
|----------|-------|------------|---------|--------|-------|------------|
56+
| abi | [has backing data source](http://ontology.naas.ai/abi/hasBackingDataSource) | Relates an entity to the data source that provides the underlying data for that entity. This property indicates the origin or source of the data that supports the entity. | A report entity may have a backing data source that provides the raw data used to generate the report. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [Data Source](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Data%20source/Data%20source.md) | []() |
5557
| bfo | [exists at](http://purl.obolibrary.org/obo/BFO_0000108) | (Elucidation) exists at is a relation between a particular and some temporal region at which the particular exists | First World War exists at 1914-1916; Mexico exists at January 1, 2000 | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [temporal region](/docs/ontology/reference/model/Entity/Occurrent/Temporal%20region/Temporal%20region.md) | []() |
5658
| bfo | [continuant part of](http://purl.obolibrary.org/obo/BFO_0000176) | b continuant part of c =Def b and c are continuants & there is some time t such that b and c exist at t & b continuant part of c at t | Milk teeth continuant part of human; surgically removed tumour continuant part of organism | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) |
5759
| bfo | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) | b has continuant part c =Def c continuant part of b | | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | []() |

docs/ontology/foundry/enterprise_management_foundry/Entity/Continuant/Generically dependent continuant/Information content entity/Descriptive information content entity/Organization acquisition/Organization acquisition.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ graph BT
4747
| Ontology | Label | Definition | Example | Domain | Range |
4848
|----------|-------|------------|---------|--------|-------|
4949
| abi | [is curated in foundry](http://ontology.naas.ai/abi/is_curated_in_foundry) | Relates a class to the foundry it is curated in. | The class cco:ont00001262 is curated in the foundry 'enterprise_management_foundry' and 'personal_ai_foundry'. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [string](http://www.w3.org/2001/XMLSchema#string) |
50+
| abi | [extracted at](http://ontology.naas.ai/abi/extracted_at) | The timestamp in ISO 8601 format when a generically dependent continuant was extracted or retrieved from its source. | 2025-06-05T12:00:00+00:00 | [generically dependent continuant](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Generically%20dependent%20continuant.md) | [dateTime](http://www.w3.org/2001/XMLSchema#dateTime) |
5051

5152
### Object Properties
5253
| Ontology | Label | Definition | Example | Domain | Range | Inverse Of |
5354
|----------|-------|------------|---------|--------|-------|------------|
55+
| abi | [has backing data source](http://ontology.naas.ai/abi/hasBackingDataSource) | Relates an entity to the data source that provides the underlying data for that entity. This property indicates the origin or source of the data that supports the entity. | A report entity may have a backing data source that provides the raw data used to generate the report. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [Data Source](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Data%20source/Data%20source.md) | []() |
5456
| bfo | [exists at](http://purl.obolibrary.org/obo/BFO_0000108) | (Elucidation) exists at is a relation between a particular and some temporal region at which the particular exists | First World War exists at 1914-1916; Mexico exists at January 1, 2000 | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [temporal region](/docs/ontology/reference/model/Entity/Occurrent/Temporal%20region/Temporal%20region.md) | []() |
5557
| bfo | [continuant part of](http://purl.obolibrary.org/obo/BFO_0000176) | b continuant part of c =Def b and c are continuants & there is some time t such that b and c exist at t & b continuant part of c at t | Milk teeth continuant part of human; surgically removed tumour continuant part of organism | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) |
5658
| bfo | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) | b has continuant part c =Def c continuant part of b | | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | []() |

docs/ontology/foundry/enterprise_management_foundry/Entity/Continuant/Generically dependent continuant/Information content entity/Descriptive information content entity/Organization merger/Organization merger.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ graph BT
4747
| Ontology | Label | Definition | Example | Domain | Range |
4848
|----------|-------|------------|---------|--------|-------|
4949
| abi | [is curated in foundry](http://ontology.naas.ai/abi/is_curated_in_foundry) | Relates a class to the foundry it is curated in. | The class cco:ont00001262 is curated in the foundry 'enterprise_management_foundry' and 'personal_ai_foundry'. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [string](http://www.w3.org/2001/XMLSchema#string) |
50+
| abi | [extracted at](http://ontology.naas.ai/abi/extracted_at) | The timestamp in ISO 8601 format when a generically dependent continuant was extracted or retrieved from its source. | 2025-06-05T12:00:00+00:00 | [generically dependent continuant](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Generically%20dependent%20continuant.md) | [dateTime](http://www.w3.org/2001/XMLSchema#dateTime) |
5051

5152
### Object Properties
5253
| Ontology | Label | Definition | Example | Domain | Range | Inverse Of |
5354
|----------|-------|------------|---------|--------|-------|------------|
55+
| abi | [has backing data source](http://ontology.naas.ai/abi/hasBackingDataSource) | Relates an entity to the data source that provides the underlying data for that entity. This property indicates the origin or source of the data that supports the entity. | A report entity may have a backing data source that provides the raw data used to generate the report. | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [Data Source](/docs/ontology/reference/model/Entity/Continuant/Generically%20dependent%20continuant/Data%20source/Data%20source.md) | []() |
5456
| bfo | [exists at](http://purl.obolibrary.org/obo/BFO_0000108) | (Elucidation) exists at is a relation between a particular and some temporal region at which the particular exists | First World War exists at 1914-1916; Mexico exists at January 1, 2000 | [entity](/docs/ontology/reference/model/Entity/Entity.md) | [temporal region](/docs/ontology/reference/model/Entity/Occurrent/Temporal%20region/Temporal%20region.md) | []() |
5557
| bfo | [continuant part of](http://purl.obolibrary.org/obo/BFO_0000176) | b continuant part of c =Def b and c are continuants & there is some time t such that b and c exist at t & b continuant part of c at t | Milk teeth continuant part of human; surgically removed tumour continuant part of organism | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) |
5658
| bfo | [has continuant part](http://purl.obolibrary.org/obo/BFO_0000178) | b has continuant part c =Def c continuant part of b | | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | [continuant](/docs/ontology/reference/model/Entity/Continuant/Continuant.md) | []() |

0 commit comments

Comments
 (0)