[PR #815] [MERGED] Adding support for page citations, and refactor the confidence into the field metadata #878

Closed
opened 2026-02-16 00:19:24 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_cloud_services/pull/815
Author: @adrianlyjak
Created: 7/29/2025
Status: Merged
Merged: 7/30/2025
Merged by: @adrianlyjak

Base: mainHead: adrian/citations


📝 Commits (5)

📊 Changes

5 files changed (+512 additions, -13 deletions)

View changed files

📝 llama_cloud_services/beta/agent_data/__init__.py (+10 -0)
📝 llama_cloud_services/beta/agent_data/schema.py (+183 -6)
📝 llama_parse/pyproject.toml (+2 -2)
📝 pyproject.toml (+1 -1)
📝 tests/beta/agent_data/test_agent_data_schema.py (+316 -4)

📄 Description

  • Adds citation support, which enables supporting jumping to the page where a field was extracted
  • Adds an overall confidence field, so that you can sort by worst/best
  • breaking change to remove the confidence dict. Is simpler to colocate it with the citations page number data

This also adds utilities for common routines frequently needed during extraction agents

  • gracefully handling data in an invalid format, and turning it into an error result
  • determining overall confidence
  • parsing citations and confidence from extraction results

See related much simpler JS client change here: https://github.com/run-llama/LlamaIndexTS/pull/2140


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/llama_cloud_services/pull/815 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 7/29/2025 **Status:** ✅ Merged **Merged:** 7/30/2025 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/citations` --- ### 📝 Commits (5) - [`07b4e9d`](https://github.com/run-llama/llama_cloud_services/commit/07b4e9d71bd7c66cb13eafcf42b0ac6a9b6fee16) huh - [`c16408c`](https://github.com/run-llama/llama_cloud_services/commit/c16408cf3802100f7b9b4f2a784024c8a977e912) Add tests - [`9e9e954`](https://github.com/run-llama/llama_cloud_services/commit/9e9e9540d61504f4bff3c46a60a7f2835a053afe) lint fix - [`37ce4e4`](https://github.com/run-llama/llama_cloud_services/commit/37ce4e48c1e131aea98976496d8a79de3e053962) bump versions - [`837cb78`](https://github.com/run-llama/llama_cloud_services/commit/837cb7844f0bce9e9f49bed700102a461994e4df) fix tests ### 📊 Changes **5 files changed** (+512 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `llama_cloud_services/beta/agent_data/__init__.py` (+10 -0) 📝 `llama_cloud_services/beta/agent_data/schema.py` (+183 -6) 📝 `llama_parse/pyproject.toml` (+2 -2) 📝 `pyproject.toml` (+1 -1) 📝 `tests/beta/agent_data/test_agent_data_schema.py` (+316 -4) </details> ### 📄 Description - Adds citation support, which enables supporting jumping to the page where a field was extracted - Adds an overall confidence field, so that you can sort by worst/best - breaking change to remove the confidence dict. Is simpler to colocate it with the citations page number data This also adds utilities for common routines frequently needed during extraction agents - gracefully handling data in an invalid format, and turning it into an error result - determining overall confidence - parsing citations and confidence from extraction results See related much simpler JS client change here: https://github.com/run-llama/LlamaIndexTS/pull/2140 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 00:19:24 -05:00
yindo closed this issue 2026-02-16 00:19:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#878