[SC-15520] Expose qualitative text agent to vm library#493
Conversation
Made-with: Cursor
Made-with: Cursor
|
Pull requests must include at least one of the required labels: |
Made-with: Cursor
|
Pull requests must include at least one of the required labels: |
Made-with: Cursor
|
Pull requests must include at least one of the required labels: |
Made-with: Cursor
|
Pull requests must include at least one of the required labels: |
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
|
Can you bump to |
PR SummaryThis PR introduces major enhancements to the ValidMind library by adding and improving the qualitative text generation functionality. Key improvements include:
Overall, these updates streamline the workflow for generating and logging qualitative text blocks while ensuring robust testing and improved error handling. Test Suggestions
|
Pull Request Description
What and why?
Implemented programmatic qualitative text generation in the ValidMind library so documentation text blocks can be generated and logged directly from Python instead of only through the UI. This adds support for single-block generation with
vm.run_text_generation(),prompt customization, section-specific context, appending new text blocks to a section, and config-driven multi-block generation withvm.generate_documentation_text().Before this change, users had to write text manually or trigger AI generation section by section in the UI. After this change, they can generate qualitative documentation in code alongside their quantitative test workflow, with notebook progress updates and a grouped summary of generated content.
How to test
pytest tests/test_api_client.py tests/test_client.py tests/test_results.py.notebooks/how_to/qualitative_text/qualitative_text_generation.ipynband run the notebook end to end against a model with the Binary classification template applied.vm.run_text_generation()works for a single text block with default behavior, with a custom prompt, and with section-specific context.vm.generate_documentation_text(config=text_config)populates the configured qualitative sections, shows progress updates during execution, and renders the grouped notebook summary by top-level section.What needs special review?
vm.run_text_generation()andvm.generate_documentation_text(), to confirm the names are clear and consistent with the rest of the library.content_idandsection_idas primary inputs to the generation call, rather than only at.log()time. This is intentional for text generation because both are placement inputs that also affect generation behavior:content_ididentifies the block being generated, andsection_idcan influence the applied guidelines for new content.notebooks/how_to/qualitative_text/qualitative_text_generation.ipynb, including whether the examples, wording, and level of detail are appropriate.notebooks/how_to/qualitative_text/qualitative_text_generation.ipynbis the right location and that the notebook title/name best matches how we want to present this feature.Dependencies, breaking changes, and deployment notes
https://github.com/validmind/frontend/pull/2390
https://github.com/validmind/backend/pull/2925
Release notes
Added support for programmatic AI generation of qualitative documentation text through the ValidMind library. Users can now generate and log text for individual documentation blocks, customize output with prompts, control generation context with selected document content, append new text blocks to a section, and populate multiple qualitative sections directly from notebooks with a config-driven workflow.
Checklist