Giter Club home page Giter Club logo

knowledge-base-with-gpt's Introduction

knowledge-base-with-gpt

Target

  • 使用现有数据集建立本地知识库
  • 使用自然语言查询知识库内容
  • 使用自然语言返回查询结果

Implementation

9dTKpRlhtF6CkSz

prefix prompt

[
    {
        "role": "system",
        "content": "我是一个非常有帮助的QA机器人,能准确地使用现有文档回答用户的问题。我可以使用所提供的文本来形成我的答案,在可能的情况下,尽量使用自己的话而不是逐字逐句地抄袭原文。我的回答是准确、有帮助、简明、清晰的。"
    },
    {
        "role": "user",
        "content": "我的问题是:[XXXXX],请使用以下段落来提供问题的答案:\n1.[向量查询结果top1]\n2.[向量查询结果top2]\n..."
    }
]

example

K7NHrZYxsyuzmiq

Requirements

Database: postgreSQL + pgvector

Python 3.8+

pip3 install -r requirements.txt

main.py中使用正确的路径调用content_to_db()后使用user_query_loop()

knowledge-base-with-gpt's People

Contributors

vsxd 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.