Trouver un programme à partir d’exemples
Show the answers. Get the method.
If you can show correct examples, Duplex can find an executable method that turns your inputs into the outputs you want, check it, and keep it to run on fresh data. You never have to write the formula.
Ask in a way that can be tested.
Give the goal, each input’s name and type, the expected output and a few input–output pairs.
| À inclure | Why |
|---|---|
| Goal and output type | A number, yes/no, text, list or record. A value and a decision made from it are different outputs. |
| Inputs, in order, with meaning | Swapping similar fields can still match some examples. Add a pair whose result changes if they’re swapped. |
| Edges | Empty input, equality, negatives, duplicates: say how to handle the ones that occur in your work. |
| Where the answers come from | A figure your AI proposed and then calls “expected” isn’t independent confirmation. |
| A held-back check | Keep one input and its known answer out of the search. Run the kept method on it later. |
When two methods fit your examples, one input that tells them apart is worth more than a longer description of the goal.
Example: a shipping rule.
Kinds of work it can learn.
Selecting or aggregating records, extracting text, transforming lists, rearranging grids, numerical operations and true/false conditions. Ask your AI which families and input shapes your installation recognizes. For multi-stage work, describe the intermediate outputs; a kept method can become a component where its types fit.
When one formula can’t explain your examples, Duplex can look for a conditional method. Give correct results for every branch: a branch with no examples is unspecified.
Numbers, thresholds and statistics.
| Kind | How to give examples |
|---|---|
| Whole numbers | Divisors, divisibility, digits, counting. Add a pair where two plausible rules disagree. Say which way to round, and don’t label an undefined case as zero. |
| Real values and angles | Give each column a meaning and a unit (degrees or radians). State the precision for checking, and whether rounding is intermediate or final. |
| Thresholds and piecewise rules | Say what happens at equality, and use close values on both sides. For two conditions, show each one alone. |
| Statistiques | A series in, the statistic out. Keep repeats that are real observations. Use your group’s convention for variance and percentiles. |
| Dates, durations and units | A date, an interval and a unit are different things. Give time zones and keep the output unit with the value. |
| Coefficients | If two fields move together in every example, add a row that changes them separately. Record the edition of any external constant. |
Lists, text, tables and more.
| Input | What to settle in the examples |
|---|---|
| Lists | Each item, a subset, or one result. Edges of windows, duplicates and whether original order matters. |
| Text | Exact input and output strings, with whitespace, punctuation and multiple matches as they matter. |
| Tables | Column meanings, which rows and fields come back, and what to do with unmatched or multiple matches in a join. |
| Matrices | Orientation. Use a second example with a different shape to test which way the operation runs. |
| Trees, graphs and sets | Nodes, edges, direction and starting point. Sets are about membership; sequences can depend on order. |
| Expressions and polynomials | Transform or evaluate? Coefficient order? Hold back a point whose answer you know. |
| Geometry and vectors | Coordinate order, dimensions and scale. Use inputs off the axes. |
| Interpolation and fitting | The variable, the measured value and the new position. A value between points says nothing beyond the range. |
Retrieve, run or search.
The search can run locally, without an outside model. Your AI can also propose a candidate, complete or as a sketch with steps left open, and Duplex checks it against the same examples, can search for the missing steps, and can ask for an input that separates competing explanations.
| Tâche | What to read |
|---|---|
| Retrieve a matching result | Which input, question and conditions matched. Reuse saves time; a fresh computation needs a run on the new values. |
| Run a kept method | The method ID and today’s inputs. The output comes from this run, on the values you gave. |
| Search for a new one | The goal, examples and any eligible components. Ask which examples a candidate passed; if the budget ran out, what would help next time. |
Les instructions qu’un agent IA suit pour bien utiliser cette partie de MatterSpace Duplex. Collez-les dans les instructions de votre agent, ou indiquez-lui le markdown de cette page.
Build a skill from examples
Call duplex_skill {op: "build"} with a problem: the goal, named and typed inputs, the output type and input/output examples. For long searches use op: "submit" and follow with op: "status".
Prepare the problem
- Read back the objective and output unit to the user before searching.
- Include equality and edge cases that occur in the user's work.
- Hold back one example with a known answer for a fresh check later.
- Expected outputs must come from the user or an independent source, never from your own guess.
Proposing your own candidate
You may submit a complete candidate or a sketch in a normal skill request. Include the expected outputs. Report what actually ran and which examples passed.
After a method is kept
Run it with duplex_skill {op: "run"}, the skill ID and new inputs. Read the card first with op: "show". Never re-implement a kept method yourself.
Never
- Never retype a discovered formula into a file as if it were the kept skill. Call the skill by ID.
- Never present a search result as verified unless the answer says so.
Where to find more in the MatterSpace Duplex docs:
- Trouver un programme à partir d’exemples, this topic in full: https://www.matterspace.ai/duplex/docs/program-synthesis.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txtPrompts pour cette page
Tous les prompts →Copiez-en un, complétez les parties entre chevrons et donnez-le à votre IA.
Use Duplex to find a method from examples. Goal: <goal>. Inputs: <name: type, name: type>. Output: <type and unit>. Examples: <input → output>, <input → output>, <input → output>. At equality, <rule>. Read the objective and unit back to me first. Hold back "<input → output>" and run the kept method on it afterwards.
Where to find more in the MatterSpace Duplex docs:
- Trouver un programme à partir d’exemples, this topic in full: https://www.matterspace.ai/duplex/docs/program-synthesis.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txtSubmit your proposed method to Duplex as a candidate and check it against these expected outputs: <input → output>, …. Show me which passed, and for any that failed, the input, the expected output and what the candidate returned.
Where to find more in the MatterSpace Duplex docs:
- Trouver un programme à partir d’exemples, this topic in full: https://www.matterspace.ai/duplex/docs/program-synthesis.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txtRun Duplex skill <skill ID> on these new inputs: <inputs>. Show me the card's input range first, then the computed output from this run. If my inputs fall outside the checked range, say so before running.
Where to find more in the MatterSpace Duplex docs:
- Trouver un programme à partir d’exemples, this topic in full: https://www.matterspace.ai/duplex/docs/program-synthesis.md
- Every prompt, and where to paste the standing ones: https://www.matterspace.ai/duplex/docs/prompts.md
- Exact tools, operations, settings and answers: https://www.matterspace.ai/duplex/docs/reference.md
- Errors and what to do about them: https://www.matterspace.ai/duplex/docs/troubleshooting.md
- Every docs page, with what it covers: https://www.matterspace.ai/duplex/docs/llms.txt
