Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to attach the metadata dictionaries to each document in RAG. #18

Open
SabaAnjum2002 opened this issue Jul 28, 2024 · 0 comments
Open

Comments

@SabaAnjum2002
Copy link

I have built a RAG pipeline with metadata extraction. I parsed 3 pdfs and got 3 Metadatas, one for each.

from llama_parse import LlamaParse

parser = LlamaParse(result_type="text")
docs = parser.load_data(file_path=full_files)
# attach metadata
for metadata, doc in zip(metadatas, docs):
    doc.metadata.update(metadata)

Using the above code, I obtained five docs since the documents are divided page-wise, and two PDFs contain two pages each. The first three documents have metadata, while the last two do not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant