Closed mariofusco closed 1 week ago
Oh, wow, that is really nice. I have a list of guardrails that we could provide. I basically followed the LLM-guard project to check what guardrails they are offering and which of them we could implement.
Oh, wow, that is really nice.
This is only the more straightforward things that it comes me to mind. We could add more features and implementations incrementally with other commits.
I have a list of guardrails that we could provide. I basically followed the LLM-guard project to check what guardrails they are offering and which of them we could implement.
If you already have a list of guardrails that we could implement and provide out-of-the-box please feel free to share it, I'd be glad to collaborate on this.
Mario are you up next week for a quick meeting and I explain my idea?
@gsmet when you have some time, I would love to chat with you about setting up a bot for this repo :) A good starting point would be providing the awesome CI summary we have in the main Quarkus repo
I think we could install the Quarkus one here and only enable some of its features (that's something we can do).
I'll add to my TODO list to prepare your CI workflows for that.
That would be awesome, thanks!
@cescoffier I should have addressed all your remarks. For now I'm keeping the 2 commits separated only to make it easier for you to review my latest change. In particular now an OutputGuardrail
can not only rewrite the textual LLM response, but also provide an explicit object result for the whole AiService invocation. In this way the object eventually deserialized from the json response can be added to the result and returned as it is instead of requiring a second deserialization.
:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.
Build (on pull request)
This is the status report for running Build (on pull request)
on commit 634ada351aa3cefd15c4929e731a542878938569.
:white_check_mark: The latest workflow run for the pull request has completed successfully.
It should be safe to merge provided you have a look at the other checks in the summary.
I implemented all the requested changes and squashed all commits.
Build (on pull request)
This is the status report for running Build (on pull request)
on commit 78fcaf4ec4f3b5e3d9d2bd7242d50e8b82e79b55.
:white_check_mark: The latest workflow run for the pull request has completed successfully.
It should be safe to merge provided you have a look at the other checks in the summary.
We should extend a bit the guardrail documentation to remove the json example and mention this one (with an example)
We should extend a bit the guardrail documentation to remove the json example and mention this one (with an example)
Agreed. I will rework docs as soon as this will be merged.
This is a first implementation of @lordofthejars 's idea discussed here https://github.com/quarkiverse/quarkus-langchain4j/discussions/1022
I believe this could be basically used for each
AiService
trying to extract a POJO from the user prompt likeimplementing the output guardrail simply extending the provided
AbstractJsonExtractorOutputGuardrail
as it follows/cc @geoand @cescoffier