文联主席是什么级别| ems什么意思| 薄如蝉翼是什么意思| b族维生素是什么意思| 知了猴有什么营养| 骨性关节炎吃什么药| 小猫起什么名字好听| 为什么会长腋毛| 小猫的胡须有什么作用| 什么是躯体化| rem睡眠是什么意思| 狼吞虎咽是什么生肖| 金什么| md是什么职位| 后背出汗是什么原因| 身上长扁平疣是什么原因| 什么是荠菜| 磊字五行属什么| ccu是什么| 哮喘什么症状| 黄体破裂是什么意思| 排尿少是什么原因| 空调外机为什么会滴水| 宫腔镜手术是什么手术| gs是什么| 脱脂牛奶是什么意思| 尿葡萄糖高是什么原因| 出岫是什么意思| loa胎位是什么意思| 梦见针是什么意思| 脚气有什么症状| 红豆泥是什么意思| 建档需要准备什么资料| 眼底出血有什么症状| 难以启齿什么意思| 大便的颜色代表什么| 右上眼皮跳是什么预兆| 金钱草长什么样子图片| 什么是马上风| 上天眷顾是什么意思| 吃什么提高免疫力最快| 痹是什么意思| 秀才指什么生肖| 吃维生素a有什么好处| 道家思想的核心是什么| 淫羊藿治什么病| 不完全性右束支阻滞是什么意思| 小孩手麻是什么原因| 万象更新是什么生肖| 紧凑是什么意思| 结核抗体弱阳性什么意思| 肠道感染用什么抗生素| 吃什么让月经量增多| 真棒是什么意思| 秦昊的父母是干什么的| electrolux是什么牌子| 蜂蜜水什么时候喝好| 淡淡的什么| 喝绿豆汤有什么好处| 疲劳是什么意思| 经常肚子痛什么原因| flair是什么意思| 射进去什么感觉| 慌张的反义词是什么| 嗓子痒吃什么药| 胃肠镜检查挂什么科| 韩红什么军衔| 电子烟有什么危害| 换身份证需要带什么| 嗓子有异物感吃什么药| 琥珀是什么意思| 生理期可以吃什么| 淋巴组织增生是什么意思| 右肾盂分离是什么意思| 利可君片是什么药| 打完升白针有什么反应| 减肥喝什么茶| 肚脐下方硬硬的是什么| 人什么什么事的成语| 指甲紫色是什么病的征兆| 软组织挫伤用什么药| 梦见别人搬家预示什么| 脚手发热是什么原因| 牙疼吃什么止疼药见效快| 吃什么补脑子增强记忆力最快| 什么降血压效果最好| lin是什么意思| 什么是功能性消化不良| 破瓦法是什么| 智齿长什么样子| 人心叵测什么意思| 九宫八卦是什么意思| pumpkin是什么意思| 油墨用什么可以洗掉| 什么的大自然| 老农民韩美丽结局是什么| 普工是什么| 子宫结节是什么意思| 处女座的幸运数字是什么| 右肋骨下方隐隐疼痛是什么原因| 吃头孢不能吃什么水果| 妇科炎症用什么药好| 心绞痛有什么症状| 三八送什么花| 生蛇是什么病| apf值是什么意思| tp是什么病毒| 果皮属于什么垃圾| 尿酸高什么意思| 者是什么意思| 植物园里有什么植物| 请丧假需要什么证明| 垂体瘤挂什么科| 开普拉多的都是什么人| 果酸是什么| 为什么会气血不足| 开尔文是什么单位| 五行缺土是什么意思| 男神是什么意思| 什么瓜不能吃脑筋急转弯| 国家为什么不承认鬼神| 周吴郑王是什么意思| 三点水弘读什么| 驻马店古代叫什么| 胃疼吃什么药最好| 蟾酥是什么| 连襟什么意思| borel手表是什么牌子| 心脏不舒服做什么检查| 萎了是什么意思| 大红袍属于什么茶类| 乳腺4a类是什么意思| 长沙为什么叫星城| 柳字五行属什么| 冰山一角是什么生肖| 甄别是什么意思| 教授是什么级别| 前列腺增生吃什么食物好| 养性是什么意思| 掌中宝是什么部位| 早孕反应最早什么时候出现| 天秤座后面是什么星座| 承认是什么意思| 为什么空调外机会滴水| 感冒发烧吃什么水果| 水瓶座的性格是什么| 愤是什么生肖| 新房送什么礼物好| 菡什么意思| 41年属什么生肖| 麸质是什么| 距离感是什么意思| 四五行属什么| 肺炎支原体抗体阳性是什么意思| 脾大吃什么可以缩脾| 炖鱼都放什么调料| 眼屎多用什么眼药水好| dr钻戒什么档次| 小猫吃什么| 老子是什么意思| 查乙肝挂什么科| 玄女是什么意思| 梦见抓龙虾是什么意思| 友尽是什么意思| 脑卒中是什么病| 财代表什么生肖| 青鱼和草鱼有什么区别| 生死离别代表什么生肖| 神经衰弱什么症状| 捡什么废品最值钱| 聪明如你什么意思| 蝙蝠来家里是什么预兆| 孕妇肾积水是什么原因引起的| 接风是什么意思| 哇噻是什么意思| rj什么意思| hvp是什么| 酸根是什么| 口腔溃疡反反复复是什么原因| 三七粉主要治什么病| 紫藤什么时候开花| v店是什么| 皂苷是什么| 发霉的衣服用什么洗能洗掉| b族维生素什么人不能吃| 寻常是什么意思| 耳鸣有什么症状| 关东煮是什么| 拆线挂什么科| 鞋底md是什么材质| 什么是新时代| 手麻看什么科| 什么规律| 窦性心律过缓是什么意思| 孕吐严重是什么原因| 睡觉腿麻是什么原因引起| 脸部麻木是什么原因引起的| 不能吃油腻的是什么病| 有什么症状是肯定没怀孕| 琬字五行属什么| 雌二醇低吃什么补得快| 二十二岁属什么| 贫血要注意些什么| 排骨汤里放什么食材好| 矬是什么意思| 梦见小蛇是什么意思| mico是什么意思| 婴儿的腿为什么是弯弯的| 尿结石吃什么药| 什么心什么气| 属狗女和什么属相最配| 待寝什么意思| 血脂异常是什么意思| 咳嗽吃什么食物好得最快最有效| 残疾证有什么补贴| 男生适合学什么专业| 蜜蜂吃什么食物| 舌苔白腻吃什么中成药| 吃什么对头发好| 三伏贴什么时候贴最好| 梦见小狗是什么意思| 陆陆续续是什么意思| 2月22是什么星座| 痔疮是什么病| 香菇不能和什么一起吃| 瘢痕子宫是什么意思| 输卵管发炎有什么症状表现| 脸上长水泡似的痘痘是什么原因| 耳朵内痒是什么原因| 3月14日是什么日子| 罗非鱼吃什么食物| 什么是裙带菜| 津字五行属什么| 贝伐珠单抗是什么药| 1948年属什么| 李子吃了有什么好处| 脸过敏用什么药膏效果最好| 高半胱氨酸是什么意思| 厥逆是什么意思| chanel是什么牌子| 第一次什么感觉| 爸爸的舅舅叫什么| 榴莲为什么贵| 精华液是干什么用的| 变异性哮喘什么症状| 为什么人死后要盖住脸| 尿频是什么症状| 短效避孕药什么牌子好| 坐月子送什么礼物好| 儿童受凉咳嗽吃什么药| 母亲节什么时候| pbs是什么| 妤是什么意思| 痔疮发痒是什么原因| 不明原因发烧挂什么科| 低脂高钙牛奶适合什么人群| 豆豉是什么| 额头发黑是什么原因| 心包积液吃什么药| 狼吞虎咽是什么生肖| o型血和什么血型最配| guess是什么牌子| 肾囊肿有什么症状表现| 隐翅虫皮炎用什么药膏| 百度
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

 
 
 

Contributors 123

西瓜有什么品种 红烧肉放什么调料 尿液很黄是什么原因 129什么星座 汗臭味很重是什么原因引起的
血半念什么 血压偏高吃什么药 花甲和什么不能一起吃 地中海贫血是什么 喝小分子肽有什么好处
1987年什么命 喉炎雾化用什么药 谷丙转氨酶是什么 一个日一个安念什么字 紫癜是什么症状
女生的胸部长什么样 爱是什么词 慢性胆囊炎吃什么药 脚痛挂什么科 正常精液是什么颜色
都字五行属什么hcv8jop1ns2r.cn 右眉上方有痣代表什么hcv8jop7ns1r.cn 善男信女什么意思hcv9jop8ns1r.cn 女生月经不规律的原因是什么hcv9jop1ns7r.cn 什么原因导致卵巢早衰hcv9jop7ns3r.cn
司法警察是做什么的hcv9jop0ns6r.cn 窜稀是什么意思hcv8jop0ns6r.cn 总是低烧是什么原因造成的hcv8jop1ns1r.cn 唐玄宗为什么叫唐明皇hcv9jop6ns4r.cn 腹腔淋巴结肿大是什么原因hcv8jop7ns3r.cn
膝盖咔咔响吃什么药hcv8jop4ns8r.cn 女性尿频挂什么科hcv7jop5ns6r.cn KTV服务员主要做什么hcv8jop6ns0r.cn 低压高吃什么药hcv9jop2ns1r.cn 身份证照片穿什么颜色衣服hcv8jop8ns0r.cn
鸡犬不宁是什么意思hcv8jop7ns7r.cn 1月21日什么星座hcv9jop0ns6r.cn 南京鸡鸣寺求什么灵hcv9jop6ns0r.cn 11月份生日是什么星座hcv8jop4ns5r.cn 不以规矩下一句是什么hcv8jop2ns0r.cn
百度