Giter Club home page Giter Club logo

my-notion-companion's Introduction

πŸ‘‰ Check out full documentation on my πŸ€— Space

My Notion Companion πŸ€–

A conversational RAG that helps to chat with my (mostly Chinese-based) Notion Databases.

My Notion Companion is a LLM-powered conversational RAG to chat with documents from Notion. It uses hybrid search (lexical + semantic) to find the relevant documents and a chat interface to interact with the docs. It uses only open-sourced technologies and can run on a single Mac Mini.

Empowering technologies

What's wrong with Notion's native search?

As much as I've been a very loyal (but freemium) Notion user, search func in Notion sucks. It supports only discrete keyword search with exact match (e.g. it treats Taylor Swift as two words).

What's even worse is that most of my documents are in Chinese. Most Chinese words consist of multiple characters. If you break them up, you end up with a total different meaning ("上桷"=Shanghai, "上"=up,"桷"=ocean).

My Notion Compnion is here to help me achieve two things:

  • to have an improved search experience across my notion databases (200+ documents)
  • to have a conversation with my Notion documents in natural language

The system design

e2e_pipeline

See more detailed evaluation and documentation on Fred's πŸ€— space!

Quickstart

Step 1: Install tools required

The following tools is required to set up the environments:

  1. Conda/Mamba package manager. I used Micromamba. Once you have the right distribution, create the virtual env with the provided env.yml
  2. LlamaCpp: to enable GPU acceleration, llamacpp has to be installed separately. See the langchain instruction to set up llamacpp in the virtual environment
  3. Redis stack server. Follow the Redis guide to set up
Step 2: Download the LLM

LlamaCpp accepts any gguf binary model files. These files can generally be found in Hugging Face searching model_name.gguf. You can choose one you like, but for running on a single machines, I suggest with models <=7B params and a quantized version.

Step 3: Create and specify various configurations
  • create new .token.toml to specify (in key-value pair) the needed tokens for notion and hugging face. You will need to generate them on their website
  • create new .env (if you want to use LangSmith as observability tool, see their guide, again you need to generate a token on their website)
  • create new .notion_databases.toml, you need to specify (in key-value pair) the databases you want to download, see the langchain guide
  • in .config.toml, change the model_path, model_name, model_mapping, embedding_model, redis_schema params according to the downloaded and used models
Step 4: Your chatbot is waiting for you!

run bash run.sh to start the notion companion! Enjoy chatting!

References

my-notion-companion's People

Contributors

fyang0507 avatar

Watchers

 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.