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

Discussion: What should go into PromptingToolsCore? #145

Open
3 of 7 tasks
svilupp opened this issue May 1, 2024 · 3 comments
Open
3 of 7 tasks

Discussion: What should go into PromptingToolsCore? #145

svilupp opened this issue May 1, 2024 · 3 comments

Comments

@svilupp
Copy link
Owner

svilupp commented May 1, 2024

As discussed previously, we should create a "core" package that defines the many types and interfaces.

What would be the scope of such a package:

  • abstract types around schema, message, etc
  • function stubs for all ai* functions and associated func (render)
  • concrete message types and supporting functions
  • how about the concrete schema types? or rendering to OpenAI spec? (or the "backends" in general)
  • abstract types and functions for RAGTools?
  • abstract types and functions for AgentTools?
  • any broadly used utility functions? (eg, pprint, last_output)

For a given type, let's say AIMessage, what functions should be in the core package?

Any thoughts?

@cpfiffer
Copy link
Collaborator

cpfiffer commented May 9, 2024

Core package (GenerativeBase.jl or something):

  • All the message types
  • Interface types for messages, i.e. content(message), tokens(message), etc.
  • Stubs for ai* stuff
  • Schema types & simple interface methods. OpenAI should probably be supported by default as it is the most common.
  • Simple utility functions, pprint and last_output are great candidates here.

PromptingTools.jl:

  • Implementations for extra schemas.

RAGTools.jl:

  • Misc RAGTools stuff. I don't think a lot of that should be in PromptingTools.jl.

AgentTools.jl

  • Also the agent stuff -- should be splintered off.

@svilupp
Copy link
Owner Author

svilupp commented May 9, 2024

That all makes sense to me (except maybe for the OpenAI calling being in GenerativeBase, because I could see a lot of stuff creep in with it like user preferences/ENV etc).

How about some of the trickier pieces:

  • lazy calls (AIGenerate, …) - currently AgentTools and probably not a core primitive, so I’d keep it
  • code evaluation / extraction of code from MSG - currently in PT, I could see it move to AgentTools or a dedicated module
  • utilities for basic text manipulations etc - currently in PT, probably common enough that I’d keep it

As part of the re-structure, it would probably also make sense to separate user preference setting (ENV stuff) from model registry (and maybe make model registry load from a file for easy manipulation / customization).

EDIT: I think I would prefer a package names that would be a bit narrower - I feel like “generative” is too broad and these few primitives (which are mostly for LLMs) do not deserve that.

@jpsamaroo
Copy link

IMO PromptingTools is a great name! That's basically what you want - tools for working with and submitting prompts to LLMs or other models that take a "prompt".

I feel like one of the biggest features for working with LLMs is just having a consistent prompting interface to all kinds of models - and PT already has this! Making it easy to switch between models, and having some basic tools for stuff like aiclassify, aiscan, etc., seems like a nice entrypoint for other packages to build on top of.

(and maybe make model registry load from a file for easy manipulation / customization).

Yes please!

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

No branches or pull requests

3 participants