Skip to main content

Docugami KG-RAG Pack

This LlamaPack provides an end-to-end Knowledge Graph Retrieval Augmented Generation flow using Docugami.

Process Documents in Docugami (before you use this template)

Before you use this llamapack, you must have some documents already processed in Docugami. Here's what you need to get started:

  1. Create a Docugami workspace (free trials available)
  2. Create an access token via the Developer Playground for your workspace. Detailed instructions.
  3. Add your documents to Docugami for processing. There are two ways to do this:
    • Upload via the simple Docugami web experience. Detailed instructions.
    • Upload via the Docugami API, specifically the documents endpoint. Code samples are available for python and JavaScript or you can use the docugami python library.

Once your documents are in Docugami, they are processed and organized into sets of similar documents, e.g. NDAs, Lease Agreements, and Service Agreements. Docugami is not limited to any particular types of documents, and the clusters created depend on your particular documents. You can change the docset assignments later if you wish. You can monitor file status in the simple Docugami webapp, or use a webhook to be informed when your documents are done processing.

Environment Variables

You need to set some required environment variables before using your new app based on this template. These are used to index as well as run the application, and exceptions are raised if the following required environment variables are not set:

  1. OPENAI_API_KEY: from the OpenAI platform.
  2. DOCUGAMI_API_KEY: from the Docugami Developer Playground
export OPENAI_API_KEY=...
export DOCUGAMI_API_KEY=...

Using the llamapack

Once your documents are finished processing, you can build and use the agent by adding the following code

from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
DocugamiKgRagPack = download_llama_pack(
    "DocugamiKgRagPack", "./docugami_kg_rag"
)

docset_id = ...
pack = DocugamiKgRagPack()
pack.build_agent_for_docset(docset_id)
pack.run(...)

Metadata

Release files for llama-index-packs-docugami-kg-rag 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-packs-docugami-kg-rag 0.3.0
File Size Uploaded Provenance Actions
llama_index_packs_docugami_kg_rag-0.3.0.tar.gz 13.6 kB Without provenance Details for llama_index_packs_docugami_kg_rag-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-packs-docugami-kg-rag 0.3.0
File Interpreter ABI Platform Actions
llama_index_packs_docugami_kg_rag-0.3.0-py3-none-any.whl Python 3 none any Details for llama_index_packs_docugami_kg_rag-0.3.0-py3-none-any.whl

Total release size: 31.2 kB

Release files / llama_index_packs_docugami_kg_rag-0.3.0.tar.gz

Download URL llama_index_packs_docugami_kg_rag-0.3.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
12b5b4b2916d49c4ef191713055c69171f04dacf4a0f4d41ecc7f6328f9365bf
BLAKE2b-256 checksum
How to use checksums
a0d2c8996557a0a696a6ec6d0e19161e7aebd4c0f4e1829c1dedda783f805133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0

Release files / llama_index_packs_docugami_kg_rag-0.3.0-py3-none-any.whl

Download URL llama_index_packs_docugami_kg_rag-0.3.0-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
150523d727fd132dffc986c75c7e2472cff1d0633bab74068d39848d51b93579
BLAKE2b-256 checksum
How to use checksums
27a3204571e17f1afec4f4355c8ca2d39fea1a0d7f01f19e7a9c52ba680622f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0

Security for llama-index-packs-docugami-kg-rag 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page