NVIDIA / NVIDIA/NeMo-Retriever

[BUG]: Tables/Chart has missing text

Open
#1,615 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
3k
Forks
349
Avg merge
1d 23h
Merged PRs (30d)
116

Description

Version

26.1.2

Which installation method(s) does this occur on?

No response

Describe the bug.

For STRUCTURED content (charts and tables), content_replace is True, so the text field is set to location (the source_location string like [CHART] source=... page=...) instead of content (the actual extracted text from table_metadata.table_content).
For structured content (tables and charts), the server writes the source_location string as the parquet text field instead of the actual extracted content. The source_location is the [CHART] source=... page=... or [TABLE] source=... page=... placeholder.
The nv-ingest server's StoreEmbedTask intentionally replaces structured content text with source_location (a placeholder string) in the parquet output. The actual table/chart text is in metadata["content"] but gets swapped out for location when doc_type is STRUCTURED.

[Code]:
nv-ingest server's embed_text_upload.py:

writer.append_row(
{
"text": location if content_replace else content,
"source": metadata["source_metadata"],
"content_metadata": metadata["content_metadata"],
"vector": metadata["embedding"],
}
)
Where:

content_replace: bool = doc_type in [ContentTypeEnum.IMAGE, ContentTypeEnum.STRUCTURED]
location: str = metadata["source_metadata"]["source_location"]
content = metadata["content"]

Minimum reproducible example
Upload any document with tables/charts using V2 api's
Relevant log output

Other/Misc.

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in nv-ingest server's embed_text_upload.py and inspect StoreEmbedTask around writer.append_row. Reproduce with a document containing tables or charts through the V2 API, then verify that the parquet text field contains metadata["content"] rather than the source_location placeholder for structured content.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.