Replies: 2 comments 3 replies
-
Hi Gauruv, can you share the file format you're using? Is this a Markdown table? |
Beta Was this translation helpful? Give feedback.
-
Hi Guarav! You can write a simple validator that validates the markdown table format. Inherit the BaseValidator object from guardrails.validators and write the validator function to ensure that it's formatted correctly. See the regex validator for example def validate(): Check for header rowheader_row = lines[0] Check for divider rowif not lines[1].startswith("---") or not lines[1].endswith("---"): Check subsequent rowsfor line in lines[2:]: return PassResult |
Beta Was this translation helpful? Give feedback.
-
Hi All,
Trust you are well !
We are getting LLM output in table structure which we want to validate via Guardrails but I couldn't find any documents around it. Not sure whether we can do it or not. Can you please let me know if it's possible via any way ?
For e.g.
This is we need to validate. Just need to make sure that the data is being returned in Table format from LLM.
Is there any way or pointer which might help ?
Many Thanks for your time.
Kind Regards
Gaurav
Beta Was this translation helpful? Give feedback.
All reactions