Giter VIP home page Giter VIP logo

eleazarchip / opencontracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsv4/opencontracts

0.0 0.0 0.0 95.87 MB

Mass document analytics platform based on LlamaIndex, Pgvector, React and Django.

Home Page: https://JSv4.github.io/OpenContracts/

License: Apache License 2.0

Shell 0.84% JavaScript 0.43% Python 43.35% TypeScript 53.79% CSS 0.92% HTML 0.06% Dockerfile 0.57% SCSS 0.04%

opencontracts's Introduction

OpenContracts

Open Contracts (Demo)

The Free and Open Source Document Analytics Platform


CI/CD codecov
Meta code style - black types - Mypy imports - isort License - Apache2

What Does it Do?

OpenContracts is an Apache-2 Licensed enterprise document analytics tool. It provides several key features:

  1. Manage Documents - Manage document collections (Corpuses)
  2. Layout Parser - Automatically extracts layout features from PDFs
  3. Automatic Vector Embeddings - generated for uploaded PDFs and extracted layout blocks
  4. Pluggable microservice analyzer architecture - to let you analyze documents and automatically annotate them
  5. Human Annotation Interface - to manually annotated documents, including multi-page annotations.
  6. LlamaIndex Integration - Use our vector stores (powered by pgvector) and any manual or automatically annotated features to let an LLM intelligently answer questions.
  7. Data Extract - ask multiple questions across hundreds of documents using complex LLM-powered querying behavior. Our sample implementation uses LlamaIndex + Marvin.
  8. Custom Data Extract - Custom data extract pipelines can be used on the frontend to query documents in bulk.

Grid Review And Sources.gif

Manual Annotations

Key Docs

We recommend you browse our docs via our Mkdocs Site. You can also view the docs in the repo:

  1. Quickstart Guide - You'll probably want to get started quickly. Setting up locally should be pretty painless if you're already running Docker.
  2. Basic Walkthrough - Check out the walkthrough to step through basic usage of the application for document and annotation management.
  3. PDF Annotation Data Format Overview - You may be interested how we map text to PDFs visually and the underlying data format we're using.
  4. Django + Pgvector Powered Hybrid Vector Database We've used the latest open source tooling for vector storage in postgres to make it almost trivially easy to combine structured metadata and vector embeddings with an API-powered application.
  5. LlamaIndex Integration Walkthrough - We wrote a wrapper for our backend database and vector store to make it simple to load our parsed annotations, embeddings and text into LlamaIndex. Even better, if you have additional annotations in the document, the LLM can access those too.
  6. Write Custom Data Extractors - Custom data extract tasks (which can use LlamaIndex or can be totally bespoke) are automatically loaded and displayed on the frontend to let user's select how to ask questions and extract data from documents.

Architecture and Data Flows at a Glance

Core Data Standard

The core idea here - besides providing a platform to analyze contracts - is an open and standardized architecture that makes data extremely portable. Powering this is a set of data standards to describe the text and layout blocks on a PDF page:

Data Format

Robust PDF Processing Pipeline

We have a robust PDF processing pipeline that is horizontally scalable and generates our standardized data consistently for PDF inputs (We're working on adding additional formats soon):

PDF Processor

Special thanks to Nlmatics and nlm-ingestor for powering the layout parsing and extraction.

Limitations

At the moment, it only works with PDFs. In the future, it will be able to convert other document types to PDF for storage and labeling. PDF is an excellent format for this as it introduces a consistent, repeatable format which we can use to generate a text and x-y coordinate layer from scratch.

Adding OCR and ingestion for other enterprise documents is a priority.

Acknowledgements

Special thanks to AllenAI's PAWLS project and Nlmatics nlm-ingestor. They've pioneered a number of features and flows, and we are using their code in some parts of the application.

opencontracts's People

Contributors

jsv4 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.