Azure-Samples / Azure-Samples/document-intelligence-code-samples

Support for Query Fields at Line Item Level (e.g., IGST Rate, IGST Amount in Invoice Items)

オープン
#123 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
201
フォーク
115
PR マージ指標
30日以内にマージされた PR はありません

説明

Description


Currently, the query_fields parameter in the begin_analyze_document API allows us to specify high-level fields such as Address or InvoiceNumber.


For example:


poller = document_intelligence_client.begin_analyze_document(
"prebuilt-layout",
AnalyzeDocumentRequest(url_source=formUrl),
features=[DocumentAnalysisFeature.QUERY_FIELDS],
query_fields=[
"Address", "InvoiceNumber"],
)

This works well for document-level fields.


However, I would like to specify query fields for each line item (product) in an invoice. For instance, in the attached sample invoice, I need to extract IGST Rate and IGST Amount for each line item in the product table.


Problem


At the moment, query_fields seems to only work for top-level fields and does not allow targeting fields inside a repeating structure like invoice line items.


Request




  • Is there a way to define query fields at the line item (per product) level?




  • If not, can support for item-level query fields (e.g., tax percentages, amounts, discounts per line item) be added in a future release?




Example Use Case


For an invoice line item table:

![Image](https://github.com/user-attachments/assets/df93fdc4-bb9f-4bb2-98e5-4f87aa0f88c0)

I want to query and extract IGST Rate and IGST Amount along with other line item details.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the Python begin_analyze_document example and its query_fields and QUERY_FIELDS parameters. Check whether the Document Intelligence API supports queries inside repeating invoice line items, including IGST Rate and IGST Amount. Done means documenting the supported approach or clearly recording that item-level query fields require future service support.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
api
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。