-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(prompts): add prompts as first class citizens #145
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timonv
commented
Jul 11, 2024
timonv
changed the title
feat: add prompts as first class citizens
feat(prompts): add prompts as first class citizens
Jul 12, 2024
This was referenced Jul 12, 2024
Closed
Merged
timonv
added a commit
that referenced
this pull request
Jul 12, 2024
## 🤖 New release * `swiftide`: 0.5.0 -> 0.6.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.6.0](https://github.com/bosun-ai/swiftide/releases/tag/0.6.0) - 2024-07-12 ### Features - [70ea268](70ea268) *(prompts)* Add prompts as first class citizens ([#145](#145)) - [699cfe4](699cfe4) *(uncategorized)* Embed modes and named vectors ([#123](#123)) ### Bug Fixes - [9334934](9334934) *(chunkcode)* Use correct chunksizes ([#122](#122)) - [7357fea](7357fea) *(deps)* Update rust crate spider to v1.98.6 ([#119](#119)) - [353cd9e](353cd9e) *(qdrant)* Upgrade and better defaults ([#118](#118)) - [b53636c](b53636c) *(uncategorized)* Inability to store only some of `EmbeddedField`s ([#139](#139)) ### Documentation - [5691ac9](5691ac9) *(readme)* Add preproduction warning - [4c40e27](4c40e27) *(readme)* Add back coverage badge - [3e447fe](3e447fe) *(readme)* Link to CONTRIBUTING ([#114](#114)) - [37af322](37af322) *(rustdocs)* Rewrite the initial landing page ([#149](#149)) - [7686c2d](7686c2d) *(uncategorized)* Templated prompts are now a major feature ### Performance - [ea8f823](ea8f823) *(uncategorized)* Improve local build performance and crate cleanup ([#148](#148)) ### Miscellaneous Tasks - [364e13d](364e13d) *(swiftide)* Loosen up dependencies ([#140](#140)) - [d2a9ea1](d2a9ea1) *(uncategorized)* Enable clippy pedantic ([#132](#132)) - [51c114c](51c114c) *(uncategorized)* Various tooling & community improvements ([#131](#131)) - [84dd65d](84dd65d) *(uncategorized)* Rename all mentions of ingest to index ([#130](#130)) **Full Changelog**: 0.1.0...0.6.0 <!-- generated by git-cliff --> </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Timon Vonk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds Prompts as first class citizens. This is a breaking change as SimplePrompt with just a a
&str
is no longer allowed.This introduces
Prompt
andPromptTemplate
. A template uses jinja style templating build on tera. Templates can be converted into prompts, and have context added. A prompt is then send to something that prompts, i.e. openai or bedrock.Additional prompts can be added either compiled or as one-offs. Additionally, it's perfectly fine to prompt with just a string as well, just provide an
.into()
.For future development, some LLMs really benefit from system prompts, which this would enable. For the query pipeline we can also take a much more structured approach with composed templates and conditionals.