Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Improve

Louis Choquelc95af3ca7655
diff --git a/.pipelex/design_pipelines.md b/.pipelex/design_pipelines.md
index 3202d4428..5a13bbf5e 100644
--- a/.pipelex/design_pipelines.md
+++ b/.pipelex/design_pipelines.md
@@ -14,7 +14,7 @@ This section explains how to design pipelines for Pipelex.
- Ensure each pipe’s `inputs` shows all required variables, including those used by nested steps or conditional branches. `inputs` is a dict mapping variable names to concept codes.
-- Choose appropriate native or structured output concepts; avoid introducing plural or adjective-based concept names. Textual concepts refining `native.Text` are acceptable too, and you don't need to specify their structure: by default it'll be text.
+- Choose appropriate native or structured output concepts.
### Root blueprint object: PipelineLibraryBlueprint
@@ -40,16 +40,38 @@ This section explains how to design pipelines for Pipelex.
### Concepts
-- Naming:
-
+- Conceiving and naming concepts:
- Use PascalCase for concept names.
- - Never use plurals (use `Item` not `Items`).
+ - DO NOT use plurals in concept names (use `Item` not `Items`).
+
+ - DO NOT use adjectives in concept names (use `Text`, not `LargeText`).
- - Avoid adjectives (use `Text`, not `LargeText`).
+ - When a concept or concept reference is unqualified (no `domain.` prefix), it will be prefixed with the current blueprint `domain` during validation/expansion, unless its name corresponds to one of the native concepts.
- Do not redefine native concepts (use them directly): `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`, `LLMPrompt`.
+ - Textual concepts refining `native.Text` are acceptable too, and you don't need to specify their structure: by default it'll be text.
+
+ - Reuse existing concepts whenever possible. For instance if you take a `Poem` and make it dark, the result is a `Poem` too: you MUST NOT create a new `DarkPoem` concept in this kind of situation.
+
+ - Concepts from the base library are also provided and must be used whenever possible:
+
+ - `documents.TextAndImagesContent` = "A content that comprises text and images where the text can include local links to the images"
+
+ - `images.VisualDescription` = "Visual description of something"
+
+ - `images.ImgGenPrompt`:
+ - definition = "Prompt to generate an image"
+ - refines = "Text"
+
+ - `images.Photo`:
+ - definition = "Photo"
+ - structure = "ImageContent"
+ - refines = "Image"
+
+ - DO NOT create a concept qualified with circumstances like `InputPhoto`: it's just a `Photo`, it so happens that we're using it as input, OK, but that will be convened by the rest of the structure.
+
- Quick form (string):
- `concept["ConceptName"] = "Definition of the concept"`
@@ -66,10 +88,6 @@ This section explains how to design pipelines for Pipelex.
- `domain: Optional[str]` — not required when provided via the library loader.
-Notes:
-
-- When a concept or concept reference is unqualified (no `domain.` prefix), it will be prefixed with the current blueprint `domain` during validation/expansion.
-
### Pipes: overall rules
Each entry under `pipe` is a dict that will be converted into a typed `PipeBlueprint` (see `pipelex/core/pipe_blueprint.py` for the base and factories in `pipe_controllers/` and `pipe_operators/`). Use the new format:
diff --git a/pipelex/cogt/content_generation/content_generator.py b/pipelex/cogt/content_generation/content_generator.py
index da1353f12..9afa75a89 100644
--- a/pipelex/cogt/content_generation/content_generator.py
+++ b/pipelex/cogt/content_generation/content_generator.py
@@ -46,7 +46,7 @@ class ContentGenerator(ContentGeneratorProtocol):
llm_prompt_for_text: LLMPrompt,
) -> str:
log.verbose(f"{self.__class__.__name__} make_llm_text: {llm_prompt_for_text}")
- log.verbose(f"llm_setting_main: {llm_setting_main}")
+ log.debug(f"llm_setting_main: {llm_setting_main}")
llm_assignment = LLMAssignment(
job_metadata=job_metadata,
llm_setting=llm_setting_main,
diff --git a/pipelex/libraries/pipelines/meta/meta_pipeline.toml b/pipelex/libraries/pipelines/meta/meta_pipeline.toml
index 9b34558de..263e73c90 100644
--- a/pipelex/libraries/pipelines/meta/meta_pipeline.toml
+++ b/pipelex/libraries/pipelines/meta/meta_pipeline.toml
@@ -16,6 +16,7 @@ type = "PipeLLM"
definition = "Generate a rough pipeline draft from natural language requirements"
inputs = { rules = "Text", requirements = "Text" }
output = "PipelineDraftText"
+llm = "llm_to_engineer"
prompt_template = """
You are a Pipelex pipeline architect. Build a pipeline draft text showing how we solve the problem.