脑卒中什么意思| 施食是什么意思| 酒后吃什么水果好| 耳门有痣代表什么| 什么是化学| 导乐分娩是什么意思| 恭候是什么意思| 饣与什么有关| 颌下淋巴结肿大挂什么科| 四叶草代表什么| 男鸡配什么属相最好| 子宫内膜薄有什么危害| 咳嗽嗓子疼吃什么药| 羊膜是什么| ins风格是什么| 首鼠两端什么意思| 日本兵为什么不怕死| 心率过快吃什么药好| 益生元是什么| 胸闷气短吃什么药疗效比较好| 全身淋巴结肿大是什么原因| Zucchini是什么意思| 眼睛浮肿什么原因| 红色学士服是什么学位| 依托是什么意思| 皖鱼是什么鱼| 三花鱼是什么鱼| ooc什么意思| 虎牙长什么样子| 5点是什么时辰| 什么的尾巴长不了歇后语| 诺帝卡是什么档次| 什么是潮吹| 直销是什么意思| 什么叫生酮| 阴骘什么意思| 肌酸激酶偏高吃什么药| 省长是什么级别| 命里有时终须有命里无时莫强求什么意思| 寂灭是什么意思| 运动后想吐是什么原因| 氯化钠是什么盐| 婴儿喝什么奶粉最好| 甲减不能吃什么东西| 火麻是什么植物| 肛门下坠是什么原因| 洛索洛芬钠片和布洛芬有什么区别| 什么方法可以让月经快点来| 阳刃是什么意思| 娘家人是什么意思| 8月19号是什么星座| 白兰地是属于什么酒| 瘿瘤是什么病| 梦到拆房子是什么意思| 梦见发面是什么意思| 兹禧属什么生肖| 佑字五行属什么| 喝蒲公英茶有什么作用| 吃什么补充维生素b| 冠状ct能查什么| 六味地黄丸什么人不能吃| 畏首畏尾是什么意思| 复方是什么意思| ca登录是什么意思| 狂犬疫苗什么时候打有效| 避孕套和安全套有什么区别| 吃什么可以止咳化痰| 黄连治什么病最好| 苏打水为什么是甜的| 梦见自己娶媳妇是什么意思| 阴唇黑是什么原因| 7月13日是什么日子| 乙肝五项145阳性是什么意思| 痔疮的初期症状是什么| 非浅表性胃炎是什么意思| 薄荷叶泡水喝有什么好处| 花胶和什么煲汤最适合| 今年53岁属什么生肖| 肝掌是什么原因引起的| 属猴的跟什么属相最配| 生理期为什么会腰疼| 晚上10点是什么时辰| 幽门螺杆菌什么症状| 阴阳二气是什么意思| 无语什么意思| 打强心针意味着什么| 手机壳什么材质最好| dha有什么作用| 精忠报国是什么意思| 梦见自己请客吃饭是什么意思| 胃肠造影主要检查什么| 寻麻疹是什么原因引起的| ac是什么基团| 梦见韭菜是什么预兆| 枯草芽孢杆菌治什么病| 心脏是由什么组织构成的| 中央电视台台长是什么级别| 赵云字什么| 咳出血是什么原因| 末梢血是什么意思| 不畏将来不念过往什么意思| 玄学是什么| 莜面是什么面做的| 喝枸杞有什么好处| 主食是什么意思| 后背不舒服是什么原因| 李健是清华什么专业| 什么澎湃| 怎么吃都不胖是什么原因| 公园里有什么有什么还有什么| 孩子感冒咳嗽吃什么药| 感冒了吃什么水果| 纳财是什么意思| 梦见青蛙是什么预兆| 84消毒液不能和什么一起用| 阑尾切除后有什么影响和后遗症| 米酒和黄酒有什么区别| 什么是soho| 限期使用日期是什么意思| 泰山在什么地方| 姨太太是什么意思| electrolux是什么牌子| kj是什么意思| 血糖高吃什么药好| 冰字五行属什么| 小儿发烧吃什么食物好| 心跳过缓吃什么药| 嘴唇黑是什么原因| 拆线挂什么科| 什么照片看不出照的是谁| 轻度异常脑电图是什么意思| 记忆力减退吃什么药效果好| 后背沉重感是什么原因引起的| 晕车吃什么好| hgh是什么意思| 为什么叫北洋政府| 闲聊是什么意思| 讨吃货什么意思| dr是什么意思| 吃皮蛋有什么好处和坏处| 张姓为什么出不了皇帝| 为什么射出的精子里有淡红色| 蚜虫用什么药| 吃三七粉有什么效果| 米醋是什么| 夜宵吃什么不会胖| hm平方是什么单位| 溶媒是什么| 男士175是什么码| hisense是什么牌子| 医院dr检查是什么| 乐意是什么意思| 一个虫一个夫念什么| 什么人容易得类风湿| 夺命大乌苏是什么意思| 吃鸡是什么意思| 山海经是什么| 带状疱疹有什么症状| 舌战群儒是什么意思| 高危hpv有什么症状| 孕妇喝什么汤| 什么是白色家电| 独角戏什么意思| 天降甘霖什么意思| naoh是什么| 未见卵黄囊是什么意思| bml是什么意思| 下焦湿热阴囊潮湿吃什么药| 1月3号什么星座| 木耳和什么不能一起吃| 什么东西补钙最好最快| 天蝎座和什么星座不合| 03年属什么| 代用茶是什么意思| 一只脚心疼是什么原因| 什么是交感神经| cop是什么| 1009是什么星座| 股票解禁是什么意思| 孔雀开屏寓意什么意思| 左胸隐痛什么原因| 新疆人信仰什么教| 大人积食吃什么药| 一个月来两次大姨妈是什么原因| 粉碎性骨折吃什么好| 学名是什么意思| 心动过缓是什么意思| 小孩睡觉张开嘴巴是什么原因| 乾隆为什么长寿| 星光是什么意思| 什么叫假性发烧| 食品级pp材质是什么| 羊蛋是什么| 羊可以加什么偏旁| 不可开交是什么意思| 666是什么意思| 踏实是什么意思| 鲮鱼是什么鱼| n2是什么意思| 飞刃是什么意思| manu是什么意思| 血小板低吃什么补得快| 寻常疣用什么药膏除根| 6月27号是什么星座| 精疲力尽是什么意思| 16是什么生肖| 拔牙为什么要验血| 子女宫是什么意思| 排卵期和排卵日有什么区别| 薄荷泡水喝有什么功效| 有机可乘是什么意思| 菊花像什么| 首脑是什么意思| 肚子为什么胀气| 出水痘吃什么药| 吕布的坐骑是什么| 系少一撇叫什么| 膀胱ca是什么意思| 木有什么意思| 梦到和死人说话是什么意思| 什么是鸡眼| 风月是什么意思| 明朝为什么会灭亡| 火把节在每年农历的什么时间举行| 做梦代表什么生肖| 罹患率是什么意思| 快闪是什么意思| 回光返照什么意思| 孩子为什么会得抽动症| 阴道真菌感染用什么药| cip号是什么| 减肥什么方法最快最有效| 二丁颗粒主要治什么病| 什么水什么山| 钧鉴是什么意思| 跖疣去医院挂什么科室| 什么烟最便宜| 间断性是什么意思| 即什么意思| 无私的动物是什么生肖| 抽搐是什么原因引起的| 39属什么生肖| 枪色是什么色| 二甲双胍缓释片什么时候吃最好| 流产后不能吃什么东西| 胆怯是什么意思| 理事是什么职位| hh是什么品牌| 恶风是什么意思| 底细是什么意思| 中国属于什么人种| 喉咙痛咳嗽吃什么药| 人次是什么意思| 晚上12点是什么时辰| 拔了智齿需要注意什么| 开心果为什么叫开心果| 补气血喝什么口服液好| 大红袍适合什么季节喝| 企业性质指的是什么| ci是什么意思| 胃气上逆是什么原因造成的| 丝瓜为什么会变黑| 什么的小球| 尿毒症挂什么科| 百度
Skip to content
/ quivr Public

Opiniated RAG for integrating GenAI in your apps ?? Focus on your product rather than the RAG. Easy integration in existing products with customisation! Any LLM: GPT4, Groq, Llama. Any Vectorstore: PGVector, Faiss. Any Files. Anyway you want.

License

Notifications You must be signed in to change notification settings

QuivrHQ/quivr

Repository files navigation

Quivr - Your Second Brain, Empowered by Generative AI

Quivr-logo

Discord Follow GitHub Repo stars Twitter Follow

Quivr, helps you build your second brain, utilizes the power of GenerativeAI to be your personal assistant !

Key Features ??

  • Opiniated RAG: We created a RAG that is opinionated, fast and efficient so you can focus on your product
  • LLMs: Quivr works with any LLM, you can use it with OpenAI, Anthropic, Mistral, Gemma, etc.
  • Any File: Quivr works with any file, you can use it with PDF, TXT, Markdown, etc and even add your own parsers.
  • Customize your RAG: Quivr allows you to customize your RAG, add internet search, add tools, etc.
  • Integrations with Megaparse: Quivr works with Megaparse, so you can ingest your files with Megaparse and use the RAG with Quivr.

We take care of the RAG so you can focus on your product. Simply install quivr-core and add it to your project. You can now ingest your files and ask questions.*

We will be improving the RAG and adding more features, stay tuned!

This is the core of Quivr, the brain of Quivr.com.

Getting Started ??

You can find everything on the documentation.

Prerequisites ??

Ensure you have the following installed:

  • Python 3.10 or newer

30 seconds Installation ??

  • Step 1: Install the package

    pip install quivr-core # Check that the installation worked
  • Step 2: Create a RAG with 5 lines of code

    import tempfile
    
    from quivr_core import Brain
    
    if __name__ == "__main__":
        with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
            temp_file.write("Gold is a liquid of blue-like colour.")
            temp_file.flush()
    
            brain = Brain.from_files(
                name="test_brain",
                file_paths=[temp_file.name],
            )
    
            answer = brain.ask(
                "what is gold? asnwer in french"
            )
            print("answer:", answer)

Configuration

Workflows

Basic RAG

Creating a basic RAG workflow like the one above is simple, here are the steps:

  1. Add your API Keys to your environment variables
import os
os.environ["OPENAI_API_KEY"] = "myopenai_apikey"

Quivr supports APIs from Anthropic, OpenAI, and Mistral. It also supports local models using Ollama.

  1. Create the YAML file basic_rag_workflow.yaml and copy the following content in it
workflow_config:
  name: "standard RAG"
  nodes:
    - name: "START"
      edges: ["filter_history"]

    - name: "filter_history"
      edges: ["rewrite"]

    - name: "rewrite"
      edges: ["retrieve"]

    - name: "retrieve"
      edges: ["generate_rag"]

    - name: "generate_rag" # the name of the last node, from which we want to stream the answer to the user
      edges: ["END"]

# Maximum number of previous conversation iterations
# to include in the context of the answer
max_history: 10

# Reranker configuration
reranker_config:
  # The reranker supplier to use
  supplier: "cohere"

  # The model to use for the reranker for the given supplier
  model: "rerank-multilingual-v3.0"

  # Number of chunks returned by the reranker
  top_n: 5

# Configuration for the LLM
llm_config:

  # maximum number of tokens passed to the LLM to generate the answer
  max_input_tokens: 4000

  # temperature for the LLM
  temperature: 0.7
  1. Create a Brain with the default configuration
from quivr_core import Brain

brain = Brain.from_files(name = "my smart brain",
                        file_paths = ["./my_first_doc.pdf", "./my_second_doc.txt"],
                        )
  1. Launch a Chat
brain.print_info()

from rich.console import Console
from rich.panel import Panel
from rich.prompt import Prompt
from quivr_core.config import RetrievalConfig

config_file_name = "./basic_rag_workflow.yaml"

retrieval_config = RetrievalConfig.from_yaml(config_file_name)

console = Console()
console.print(Panel.fit("Ask your brain !", style="bold magenta"))

while True:
    # Get user input
    question = Prompt.ask("[bold cyan]Question[/bold cyan]")

    # Check if user wants to exit
    if question.lower() == "exit":
        console.print(Panel("Goodbye!", style="bold yellow"))
        break

    answer = brain.ask(question, retrieval_config=retrieval_config)
    # Print the answer with typing effect
    console.print(f"[bold green]Quivr Assistant[/bold green]: {answer.answer}")

    console.print("-" * console.width)

brain.print_info()
  1. You are now all set up to talk with your brain and test different retrieval strategies by simply changing the configuration file!

Go further

You can go further with Quivr by adding internet search, adding tools, etc. Check the documentation for more information.

Contributors ?

Thanks go to these wonderful people:

Contribute ??

Did you get a pull request? Open it, and we'll review it as soon as possible. Check out our project board here to see what we're currently focused on, and feel free to bring your fresh ideas to the table!

Partners ??

This project would not be possible without the support of our partners. Thank you for your support!

YCombinator Theodo

License ??

This project is licensed under the Apache 2.0 License - see the LICENSE file for details

About

Opiniated RAG for integrating GenAI in your apps ?? Focus on your product rather than the RAG. Easy integration in existing products with customisation! Any LLM: GPT4, Groq, Llama. Any Vectorstore: PGVector, Faiss. Any Files. Anyway you want.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 
经常眩晕是什么原因引起的 可塑性是什么意思 既寿永昌什么意思 打牌老是输是什么原因 10月16日出生的是什么星座
下蛊是什么意思 巴子是什么意思 克感敏又叫什么 黑玫瑰代表什么 及什么意思
无机磷偏低有什么影响 生殖激素常规检查是查什么的 决定的近义词是什么 全身冰凉是什么原因 属羊的和什么属相最配
日加匀念什么 总胆红素偏高是什么引起的 甲鱼跟什么炖最补 什么症状是怀孕了 慎独什么意思
腥臭味是什么妇科病qingzhougame.com 膂力是什么意思0735v.com 吃什么可以控制血糖hcv7jop5ns1r.cn 醒面是什么意思hcv8jop3ns9r.cn 软助什么意思hcv8jop0ns0r.cn
眉毛附近长痘痘是什么原因hcv9jop1ns1r.cn 属鸡的本命佛是什么佛hcv9jop6ns5r.cn 带状疱疹不能吃什么zhongyiyatai.com 鱼的五行属什么hcv7jop6ns2r.cn 月经是黑色的是什么原因hcv9jop3ns2r.cn
冬瓜有什么功效和作用hcv9jop7ns9r.cn 孙悟空姓什么hcv7jop6ns1r.cn 梦见补的牙齿掉了是什么意思wzqsfys.com 日光灯属于什么光源hcv9jop3ns6r.cn uu什么意思naasee.com
脚肿吃什么药hcv9jop2ns8r.cn 吃什么补血快效果好hcv8jop6ns3r.cn 母鸡什么意思hcv8jop7ns8r.cn 生姜泡醋有什么功效hcv7jop9ns9r.cn 男生射精是什么感觉weuuu.com
百度