You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/best_practices.mdc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,4 +74,4 @@ This document outlines the core best practices and patterns used in our codebase
74
74
75
75
## Pipelines
76
76
77
-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
77
+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
Copy file name to clipboardExpand all lines: .cursor/rules/pipe-batch.mdc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ alwaysApply: false
7
7
8
8
The PipeBatch controller allows you to apply a pipe operation to each element in a list of inputs in parallele. It is created via a PipeSequence.
9
9
10
-
## Usage in TOML Configuration
10
+
## Usage in PLX Configuration
11
11
12
-
```toml
12
+
```plx
13
13
[pipe.sequence_with_batch]
14
14
type = "Sequence"
15
15
description = "A Sequence of pipes"
@@ -29,4 +29,4 @@ steps = [
29
29
30
30
# Important tip
31
31
32
-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
32
+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
Copy file name to clipboardExpand all lines: .cursor/rules/pipe-condition.mdc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ alwaysApply: false
7
7
8
8
The PipeCondition controller allows you to implement conditional logic in your pipeline, choosing which pipe to execute based on an evaluated expression. It supports both direct expressions and expression templates.
9
9
10
-
## Usage in TOML Configuration
10
+
## Usage in PLX Configuration
11
11
12
12
### Basic Usage with Direct Expression
13
13
14
-
```toml
14
+
```plx
15
15
[pipe.conditional_operation]
16
16
type = "PipeCondition"
17
17
description = "A conditonal pipe to decide wheter..."
@@ -25,7 +25,7 @@ medium = "process_medium"
25
25
large = "process_large"
26
26
```
27
27
or
28
-
```toml
28
+
```plx
29
29
[pipe.conditional_operation]
30
30
type = "PipeCondition"
31
31
description = "A conditonal pipe to decide wheter..."
@@ -49,4 +49,4 @@ large = "process_large"
49
49
50
50
# Important tip
51
51
52
-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
52
+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
Copy file name to clipboardExpand all lines: .cursor/rules/pipe-llm.mdc
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ PipeLLM is used to:
14
14
## Basic Usage
15
15
16
16
### Simple Text Generation
17
-
```toml
17
+
```plx
18
18
[pipe.write_story]
19
19
type = "PipeLLM"
20
20
description = "Write a short story"
@@ -25,7 +25,7 @@ Write a short story about a programmer.
25
25
```
26
26
27
27
### Structured Data Extraction
28
-
```toml
28
+
```plx
29
29
[pipe.extract_info]
30
30
type = "PipeLLM"
31
31
description = "Extract information"
@@ -56,7 +56,7 @@ class PersonInfo(StructuredContent): # The output models always have to be subcl
56
56
You can specify LLM settings in two ways:
57
57
58
58
1. **Direct in the pipe**:
59
-
```toml
59
+
```plx
60
60
[pipe.analyze]
61
61
type = "PipeLLM"
62
62
description = "Analyze text"
@@ -66,7 +66,7 @@ prompt_template = "Analyze this text"
66
66
```
67
67
68
68
2. **Using predefined settings** from `pipelex_libraries/llm_deck/base_llm_deck.toml`:
69
-
```toml
69
+
```plx
70
70
[pipe.analyze]
71
71
type = "PipeLLM"
72
72
description = "Analyze text"
@@ -77,7 +77,7 @@ prompt_template = "Analyze this text"
77
77
78
78
### System Prompts
79
79
Add system-level instructions:
80
-
```toml
80
+
```plx
81
81
[pipe.expert_analysis]
82
82
type = "PipeLLM"
83
83
description = "Expert analysis"
@@ -88,7 +88,7 @@ prompt_template = "Analyze this data"
88
88
89
89
### Multiple Outputs
90
90
Generate multiple results:
91
-
```toml
91
+
```plx
92
92
[pipe.generate_ideas]
93
93
type = "PipeLLM"
94
94
description = "Generate ideas"
@@ -100,7 +100,7 @@ multiple_output = true # Let the LLM decide how many to generate
100
100
101
101
### Vision Tasks
102
102
Process images with VLMs:
103
-
```toml
103
+
```plx
104
104
[pipe.analyze_image]
105
105
type = "PipeLLM"
106
106
description = "Analyze image"
@@ -111,4 +111,4 @@ prompt_template = "Describe what you see in this image"
111
111
112
112
# Important tip
113
113
114
-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
114
+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
Copy file name to clipboardExpand all lines: .cursor/rules/pipe-ocr.mdc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Extract text and images from an image or a PDF
12
12
## Basic Usage
13
13
14
14
### Simple Text Generation
15
-
```toml
15
+
```plx
16
16
[pipe.extract_info]
17
17
type = "PipeOcr"
18
18
description = "extract the information"
@@ -37,4 +37,4 @@ class PageContent(StructuredContent):
37
37
38
38
# Important tip
39
39
40
-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
40
+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
Copy file name to clipboardExpand all lines: .cursor/rules/pipelex.mdc
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ alwaysApply: true
4
4
# Pipeline Guide
5
5
6
6
- Always first write your "plan" in natural langage, then transcribe it in pipelex.
7
-
- You should ALWAYS RUN the terminal command `pipelex validate` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
7
+
- You should ALWAYS RUN the terminal command `pipelex validate all -c pipelex/libraries` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
8
8
- Please use POSIX standard for files. (enmpty lines, no trailing whitespaces, etc.)
9
9
10
10
# Pipeline Structure Guide
11
11
12
12
## Pipeline File Naming
13
-
- Files must be `.toml` for pipelines (Always add an empty line at the end of the file, and do not add trailing whitespaces to TOML files at all)
13
+
- Files must be `.plx` for pipelines (Always add an empty line at the end of the file, and do not add trailing whitespaces to PLX files at all)
14
14
- Files must be `.py` for structures
15
15
- Use descriptive names in `snake_case`
16
16
@@ -21,14 +21,14 @@ A pipeline file has three main sections:
21
21
3. Pipe definitions
22
22
23
23
### Domain Statement
24
-
```toml
24
+
```plx
25
25
domain = "domain_name"
26
26
definition = "Description of the domain" # Optional
27
27
```
28
-
Note: The domain name usually matches the toml filename for single-file domains. For multi-file domains, use the subdirectory name.
28
+
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
29
29
30
30
### Concept Definitions
31
-
```toml
31
+
```plx
32
32
[concept]
33
33
ConceptName = "Description of the concept" # Should be the same name as the Structure ClassName you want to output
34
34
```
@@ -43,7 +43,7 @@ yes
43
43
44
44
## Pipe Base Structure
45
45
46
-
```toml
46
+
```plx
47
47
[pipe.your_pipe_name]
48
48
type = "PipeLLM"
49
49
description = "A description of what your pipe does"
@@ -52,14 +52,14 @@ output = "ConceptName"
52
52
```
53
53
54
54
DO NOT WRITE:
55
-
```toml
55
+
```plx
56
56
[pipe.your_pipe_name]
57
57
type = "pipe_sequence"
58
58
```
59
59
60
60
But it should be:
61
61
62
-
```toml
62
+
```plx
63
63
[pipe.your_pipe_name]
64
64
type = "PipeSequence"
65
65
description = "....."
@@ -74,7 +74,7 @@ That means that the pipe validate_expense is missing the input `ocr_input` becau
74
74
75
75
NEVER WRITE THE INPUTS BY BREAKING THE LINE LIKE THIS:
76
76
<NEVER DO THIS>
77
-
```toml
77
+
```plx
78
78
inputs = {
79
79
input_1 = "ConceptName1",
80
80
input_2 = "ConceptName2"
@@ -152,7 +152,7 @@ Look at the Pipes we have in order to adapt it. Pipes are organized in two categ
152
152
PipeSequence executes multiple pipes in a defined order, where each step can use results from previous steps.
153
153
154
154
## Basic Structure
155
-
```toml
155
+
```plx
156
156
[pipe.your_sequence_name]
157
157
type = "PipeSequence"
158
158
description = "Description of what this sequence does"
@@ -175,7 +175,7 @@ steps = [
175
175
176
176
You can use PipeBatch functionality within steps using `batch_over` and `batch_as`:
@@ -196,11 +196,11 @@ The result of a batched step will be a `ListContent` containing the outputs from
196
196
197
197
The PipeCondition controller allows you to implement conditional logic in your pipeline, choosing which pipe to execute based on an evaluated expression. It supports both direct expressions and expression templates.
198
198
199
-
## Usage in TOML Configuration
199
+
## Usage in PLX Configuration
200
200
201
201
### Basic Usage with Direct Expression
202
202
203
-
```toml
203
+
```plx
204
204
[pipe.conditional_operation]
205
205
type = "PipeCondition"
206
206
description = "A conditonal pipe to decide wheter..."
@@ -214,7 +214,7 @@ medium = "process_medium"
214
214
large = "process_large"
215
215
```
216
216
or
217
-
```toml
217
+
```plx
218
218
[pipe.conditional_operation]
219
219
type = "PipeCondition"
220
220
description = "A conditonal pipe to decide wheter..."
@@ -240,9 +240,9 @@ large = "process_large"
240
240
241
241
The PipeBatch controller allows you to apply a pipe operation to each element in a list of inputs in parallele. It is created via a PipeSequence.
242
242
243
-
## Usage in TOML Configuration
243
+
## Usage in PLX Configuration
244
244
245
-
```toml
245
+
```plx
246
246
[pipe.sequence_with_batch]
247
247
type = "PipeSequence"
248
248
description = "A Sequence of pipes"
@@ -271,7 +271,7 @@ PipeLLM is used to:
271
271
## Basic Usage
272
272
273
273
### Simple Text Generation
274
-
```toml
274
+
```plx
275
275
[pipe.write_story]
276
276
type = "PipeLLM"
277
277
description = "Write a short story"
@@ -282,7 +282,7 @@ Write a short story about a programmer.
282
282
```
283
283
284
284
### Structured Data Extraction
285
-
```toml
285
+
```plx
286
286
[pipe.extract_info]
287
287
type = "PipeLLM"
288
288
description = "Extract information"
@@ -296,7 +296,7 @@ Extract person information from this text:
296
296
297
297
### System Prompts
298
298
Add system-level instructions:
299
-
```toml
299
+
```plx
300
300
[pipe.expert_analysis]
301
301
type = "PipeLLM"
302
302
description = "Expert analysis"
@@ -307,7 +307,7 @@ prompt_template = "Analyze this data"
307
307
308
308
### Multiple Outputs
309
309
Generate multiple results:
310
-
```toml
310
+
```plx
311
311
[pipe.generate_ideas]
312
312
type = "PipeLLM"
313
313
description = "Generate ideas"
@@ -319,7 +319,7 @@ multiple_output = true # Let the LLM decide how many to generate
319
319
320
320
### Vision Tasks
321
321
Process images with VLMs:
322
-
```toml
322
+
```plx
323
323
[pipe.analyze_image]
324
324
type = "PipeLLM"
325
325
description = "Analyze image"
@@ -337,7 +337,7 @@ Extract text and images from an image or a PDF
337
337
## Basic Usage
338
338
339
339
### Simple Text Generation
340
-
```toml
340
+
```plx
341
341
[pipe.extract_info]
342
342
type = "PipeOcr"
343
343
description = "extract the information"
@@ -369,7 +369,7 @@ This rule explains how to write prompt templates in PipeLLM definitions.
369
369
If the inserted text is supposedly long text, made of several lines or paragraphs, you want it inserted inside a block, possibly a block tagged and delimlited with proper syntax as one would do in a markdown documentation. To include stuff as a block, use the "@" prefix.
370
370
371
371
Example template:
372
-
```toml
372
+
```plx
373
373
prompt_template = """
374
374
Match the expense with its corresponding invoice:
375
375
@@ -388,7 +388,7 @@ In this example, the expense data and the invoices data are obviously made of se
388
388
If the inserted text is short text and it makes sense to have it inserted directly into a sentence, you want it inserted inline. To insert stuff inline, use the "$" prefix. This will insert the stuff without delimiters and the content will be rendered as plain text.
389
389
390
390
Example template:
391
-
```toml
391
+
```plx
392
392
prompt_template = """
393
393
Your goal is to summarize everything related to $topic in the provided text:
394
394
@@ -515,6 +515,6 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
515
515
)
516
516
```
517
517
518
-
ALWAYS RUN `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
518
+
ALWAYS RUN `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
519
519
Then, create an example file to run the pipeline in the `examples` folder.
520
520
But don't write documentation unless asked explicitly to.
0 commit comments