Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Allow for creating patterns in YAML #1167

Open
dmoore44 opened this issue Nov 26, 2024 · 4 comments
Open

[Feature request]: Allow for creating patterns in YAML #1167

dmoore44 opened this issue Nov 26, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@dmoore44
Copy link

What do you need?

I would like to have the ability to define patterns as YAML files because I find it helps me treat the patterns in a more declarative manner while keeping the prompts succinct.

Example:

system:
  role: Nobel Prize winning economist
  goal: Your goal is to ingest economic news and reports regarding economic activity, extract the appropriate information from those sources, and provide a summary of events and describe potential implications on future economic activity.
  traits:
    - direct
    - efficient
    + context_aware
  guidelines:
    - Provide detailed technical information
    - Structure the information in a logical and coherent manner
    - Avoid generic or ambiguous information
    - Include citations
  
  optimization:
    token_efficiency: high
    response_patterns:
      - clear_structure
      - practical_focus
    
  constraints:
    environmental:
      - token_limits
      - response_time
      - context_relevance
@dmoore44 dmoore44 added the enhancement New feature or request label Nov 26, 2024
@mattjoyce
Copy link
Contributor

mattjoyce commented Dec 3, 2024

I like this idea.

I have a branch with template extensions, which allows fabric to pull in context at run time.

All we would need is a pattern call say
-p fromyaml

That would contain a call to an extension which takes a variable.

{{ext:fromyaml:read:{{yamlfilename}}}}

Then specify the yaml file as a var.

./fabric -p fromyaml -v=yamlfilename:foo yaml

Need to write the extension is all...

@mattjoyce
Copy link
Contributor

Oh there is a I like this idea.

I have a branch with template extensions, which allows fabric to pull in context at run time.

All we would need is a pattern call say
-p fromyaml

That would contain a call to an extension which takes a variable.

{{ext:fromyaml:read:{{yamlfilename}}}}

Then specify the yaml file as a car.

./fabric -p fromyaml -v=yamlfilename:foo yaml

The other enhancement I'm thinking about is feeding variable values as yaml, in user input.

@mattjoyce
Copy link
Contributor

I was thinking a bit more about this.
Really what we might need is --confif foo.yaml, and allow that to specify any/all config options.

@mattjoyce
Copy link
Contributor

@dmoore44 , actually, there is nothing to stop you doing this now.
I added file based adhoc patterns a while ago.

you can save your yaml, and use it like this.

./fabric --pattern ./mypattern.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants