docling-project / docling-project/docling

Add `NodeRelationship.PARENT` in llama_index

Open
#1,955 1 comment 0 reactions 1 assignee Claimed by @vagenas View on GitHub
enhancement
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Requested feature

When I save a docling document as JSON, it has nice references for parents, children, and groups. If I load this data into a vector database with llama_index, the prev/next/source relationships are there, but the parent relationship is gone. Dumping the node returned for a RAG query returns a `relationships` key:

```
relationships={
: RelatedNodeInfo(
: RelatedNodeInfo(
: RelatedNodeInfo(
```

But the parent relationship is missing and that causes `node.parent_node` to be empty.

### Alternatives

I could go digging through metadata for the node to get the parent, build a metadata filter, and have llama_index search the vector DB for that, but it feels inefficient and error prone.

Should I be going about this in another way?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.