Comments (2)
Thanks for testing out the library @bluewin4!
This is a pretty interesting suggestion. I think this could be pretty useful. My main concern would be around managing the different prompts for the two LLM API calls. The first prompt should ideally contain the full information around what the content of the answer should be, and the second prompt should contain info about the structure that the content should be formatted into.
One way to implement this could be to have the user continue to write a single rail
spec, and then Guardrails compiles the rail
spec into the prompt needed for each LLM API call.
Another thing to figure out would be reasking -- reasking would also need to be broken out into reasking for content and reasking for structure.
I'll dig deeper into this and see what the MVP is that I can implement. If you have other suggestions, lmk!
Also, we chatted about this briefly in the discord in case you're interested in following along.
from guardrails.
I've also found it useful sometimes to invoke a LLM call first, then run guardrails over its result. But for now we've decided to leave this to the user, not as an internal part of the library.
from guardrails.
Related Issues (20)
- Add better_profanity as a validator which takes care of word dividers HOT 4
- Dead link to docs page HOT 2
- [bug] Importing guardrails raises a deprecation warning for old validators HOT 1
- [bug] JSON validation converts null values to True:bool HOT 1
- No capability to disable telemetry via env var [bug] HOT 2
- [bug] Message: guardrails-cli[6204] , ERROR Failed to inspect HOT 8
- Guardrails Langchain integration with streamable AgentExecutor HOT 7
- Automatically open `hub.guardrailsai.com/tokens` url when running guardrails configure HOT 1
- [feat] Support for image inputs in prompts HOT 1
- [bug] Endpoint is reachable Validator "Zero-click" Vulnerability HOT 5
- [bug]: Guardrails hub token not getting generated HOT 7
- Import Error - Cannot import name 'SensitiveTopic' from 'guardrails.hub' HOT 5
- How to Deploy Guardrails with Hub via Docker image HOT 4
- [bug] detect-prompt-injetion validator fails to install from hub HOT 2
- [feat] Support defaults
- [feat] add a `quiet` option to `guardrails hub install`
- [feat] Update validator imports in notebooks to hub
- [bug] llm_api function triggering twice HOT 6
- [bug] OpenAI v1.x AsyncClient Does Not Work in Guardrails as Expected
- [bug] Guardrails prohibits OpenAI from utilizing env-var based API key HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guardrails.