Skip to content

✨ add RAG document management - #282

Open
ianardee wants to merge 1 commit into
mainfrom
rag-docs
Open

ianardee wants to merge 1 commit into
mainfrom
rag-docs

Conversation

@ianardee

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

@ianardee
ianardee force-pushed the rag-docs branch 2 times, most recently from 2b37363 to 8cf9500 Compare November 16, 2026 16:40
@ianardee
ianardee requested a balanced review from Copilot November 16, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change silently drops symbol-keyed annotation corrections, leaves new RAG classes unavailable through the public loader, and breaks the existing CommonResponse constant and require path.

3 open issues
What changed in this PR

Adds data models and request parameters for extraction RAG document management in the Ruby SDK. It also separates shared response handling from inference-specific responses.

Changes:

  • Adds RAG annotations, nested field models, upload/update parameters, and response parsing.
  • Refactors the V2 response hierarchy and updates corresponding RBS signatures.
  • Adds parameter and response specs, plus repository typing guidance.
File Description
spec/​v2/​product/​extraction/​rag_document_spec.rb Tests RAG parameters and response parsing.
spec/​v2/​parsing/​base_response_spec.rb Updates tests to target BaseResponse.
sig/​mindee/​v2/​product/​split/​split_response.rbs Updates inference-response inheritance.
sig/​mindee/​v2/​product/​ocr/​ocr_response.rbs Updates inference-response inheritance.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​rag_annotation.rbs Types annotation serialization.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​params/​rag_document_upload_parameters.rbs Types extraction upload parameters.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​params/​rag_document_annotation_parameters.rbs Types annotation update parameters.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​extraction_rag_annotation_response.rbs Types extraction RAG responses.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_simple_field.rbs Types scalar annotation fields.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_object_field.rbs Types nested annotation objects.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_list_field.rbs Types annotation lists.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_fields.rbs Types annotation field collections.
sig/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_base_field.rbs Types shared annotation configuration.
sig/​mindee/​v2/​product/​extraction/​extraction_response.rbs Updates inference-response inheritance.
sig/​mindee/​v2/​product/​crop/​crop_response.rbs Updates inference-response inheritance.
sig/​mindee/​v2/​product/​classification/​classification_response.rbs Updates inference-response inheritance.
sig/​mindee/​v2/​product/​base_product.rbs Updates the default response type.
sig/​mindee/​v2/​parsing/​search/​base_search_response.rbs Uses the shared response base.
sig/​mindee/​v2/​parsing/​job_response.rbs Uses the shared response base.
sig/​mindee/​v2/​parsing/​failed_inference_response.rbs Declares shared response inheritance.
sig/​mindee/​v2/​parsing/​common_response.rbs Removes the former shared response signature.
sig/​mindee/​v2/​parsing/​base_response.rbs Types shared raw-response handling.
sig/​mindee/​v2/​parsing/​base_rag_annotation_response.rbs Types common RAG document metadata.
sig/​mindee/​v2/​parsing/​base_inference_response.rbs Introduces the generic inference-response type.
sig/​mindee/​v2/​client_options/​base_rag_document_upload_parameters.rbs Types shared upload parameters.
sig/​mindee/​v2/​client_options/​base_annotation_parameters.rbs Types shared annotation parameters.
sig/​mindee/​input/​local_response.rbs Updates the deserialization response type.
lib/​mindee/​v2/​product/​split/​split_response.rb Uses the inference-specific response base.
lib/​mindee/​v2/​product/​ocr/​ocr_response.rb Uses the inference-specific response base.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​rag_annotation.rb Parses and serializes annotations.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​params/​rag_document_upload_parameters.rb Adds extraction RAG upload parameters.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​params/​rag_document_annotation_parameters.rb Builds annotation update parameters.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​extraction_rag_annotation_response.rb Parses extraction RAG response metadata.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_simple_field.rb Adds scalar annotation fields.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_object_field.rb Adds nested annotation objects.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_list_field.rb Adds annotation lists and item accessors.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_fields.rb Adds typed field lookup and serialization.
lib/​mindee/​v2/​product/​extraction/​rag_documents/​annotated_base_field.rb Adds shared configuration and field construction.
lib/​mindee/​v2/​product/​extraction/​params.rb Adds an extraction-parameter require aggregator.
lib/​mindee/​v2/​product/​extraction/​extraction_response.rb Uses the inference-specific response base.
lib/​mindee/​v2/​product/​crop/​crop_response.rb Uses the inference-specific response base.
lib/​mindee/​v2/​product/​classification/​classification_response.rb Uses the inference-specific response base.
lib/​mindee/​v2/​product/​base_product.rb Sets the inference-specific default response.
lib/​mindee/​v2/​parsing/​search/​base_search_response.rb Uses the shared response base.
lib/​mindee/​v2/​parsing/​job_response.rb Loads and inherits the shared response base.
lib/​mindee/​v2/​parsing/​inference_job.rb Removes the obsolete response require.
lib/​mindee/​v2/​parsing/​failed_inference_response.rb Uses the shared response base.
lib/​mindee/​v2/​parsing/​common_response.rb Removes the former shared response class.
lib/​mindee/​v2/​parsing/​base_response.rb Centralizes raw-response serialization.
lib/​mindee/​v2/​parsing/​base_rag_annotation_response.rb Parses common RAG document metadata.
lib/​mindee/​v2/​parsing/​base_inference_response.rb Introduces the inference-specific response base.
lib/​mindee/​v2/​parsing.rb Loads the new response hierarchy.
lib/​mindee/​v2/​http/​mindee_api_v2.rb Updates return-type documentation only.
lib/​mindee/​v2/​client.rb Updates return-type documentation only.
lib/​mindee/​v2/​client_options/​base_rag_document_upload_parameters.rb Validates and serializes model identifiers.
lib/​mindee/​v2/​client_options/​base_annotation_parameters.rb Validates annotation document identifiers.
lib/​mindee/​input/​local_response.rb Updates deserialization documentation only.
bin/​v2/​parser.rb Updates response-type documentation only.
AGENTS.md Documents the matching RBS requirement.

Review effort: Balanced

Comment thread lib/mindee/v2/parsing.rb Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved issues cause incorrect RAG field rendering, silently discard symbol-keyed annotations, and break existing callers by removing public response and product APIs.

4 open issues
3 resolved since last review

Review effort: Balanced

Comment thread lib/mindee/v2/product/base_product.rb Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants