Skip to content

feat: improve tabular SK large result handling - #913

Merged
Paul Lizer (paullizer) merged 2 commits into
microsoft:Developmentfrom
paullizer:feature/tabular-sk-large-result-pagination
Jun 18, 2026
Merged

feat: improve tabular SK large result handling#913
Paul Lizer (paullizer) merged 2 commits into
microsoft:Developmentfrom
paullizer:feature/tabular-sk-large-result-pagination

Conversation

@paullizer

Copy link
Copy Markdown
Contributor

Summary

This PR improves Tabular Semantic Kernel analysis by adding safer large-result handling and Python runtime compatibility on top of the current Development tabular pipeline.

Changes include:

  • Adds pagination metadata for row-returning tabular tools: start_row, page_size, has_more, and next_start_row.
  • Preserves explicit return_columns projection and protected row metadata such as _sheet, _matched_columns, _matched_values, _matched_on, _matched_source_values, and _related_document_reference_values.
  • Adds safe row payload trimming for oversized tool results without skipping rows during continuation.
  • Raises tabular SK computed-results handoff guardrails to 100K characters with warning logs on truncation.
  • Keeps current Development model-context routing instead of reintroducing older direct endpoint wiring.
  • Updates public @kernel_function tabular tool parameters to avoid Annotated[Optional[str], ...], preserving compatibility with both Python 3.12 and Python 3.13.

Attribution

This work is inspired by and adapted from the intent and design direction in these PRs by vivche:

The implementation here was rebuilt against the current Development branch to preserve newer model-context routing, related-document evidence, generated tabular outputs, and thought tracking.

The commit includes this co-author trailer for attribution:

Co-authored-by: vivche <214204244+vivche@users.noreply.github.com>

Thank you vivche for surfacing the problems and proposing the original direction.

Documentation

Added:

  • docs/explanation/features/v0.242.067/TABULAR_SK_LARGE_RESULT_PAGINATION.md
  • docs/explanation/fixes/v0.242.068/TABULAR_SK_PY313_KERNEL_PARAMETER_FIX.md

Updated:

  • docs/explanation/features/index.md
  • docs/explanation/fixes/index.md

Tests

Verified locally:

  • py_compile on modified Python modules and modified functional tests.
  • functional_tests/test_tabular_kernel_parameter_annotations.py: 1/1 passed.
  • functional_tests/test_tabular_large_result_pagination.py: 5/5 passed.
  • functional_tests/test_tabular_large_result_handoff.py: 2/2 passed.
  • functional_tests/test_tabular_relational_analysis_helpers.py: 12/12 passed.
  • functional_tests/test_tabular_related_document_evidence.py: 7/7 passed.
  • get_errors: no diagnostics on touched files.
  • git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check: passed.

Notes

This PR intentionally does not include the unrelated ServiceNow docs/spec changes that were bundled in the source PR branches.

Adds paginated row-returning tabular tools, safe row payload trimming, return_columns projection, a larger computed-results handoff guardrail, and Python 3.13-safe Semantic Kernel parameter annotations.
Inspired by and adapted from PRs microsoft#892 and microsoft#894 by @vivche.
Co-authored-by: vivche <214204244+vivche@users.noreply.github.com>
Adds v0.242.068 release notes for tabular SK large-result handling and Python 3.13 Semantic Kernel parameter compatibility.
Attributes the source ideas to PRs microsoft#892 and microsoft#894 by @vivche.
Co-authored-by: vivche <214204244+vivche@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit a7147be into microsoft:DevelopmentJun 18, 2026
7 checks passed
Sign up for freeto 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.

1 participant

@paullizer