我将向您展示如何开发系统,以优化使用上下文数据库中人工智能应用程序中提示的使用。该项目使用Python ,DuckDB,Langchain等技术。它突出使用DuckDB作为矢量数据库,这有助于有效地管理大型数据量,而Langchain库则集成以探索Chatgpt-3.5或更高语言模型的功能。
通过这种集成,该项目结合了诸如嵌入和续航力的生成(RAG)之类的先进技术,展示了所涵盖的理论概念的实用且复杂的应用。这种工具和技术的组合不仅提高了AI应用程序的准确性和效率,而且还例证了很少射击提示的实践,其中提示了一些示例,这些示例有助于更好地了解所要求的内容。

git clone https://github.com/Renatoelho/ContextDB.git contextDB cd contextDB/app/python3 -m venv .venv source .venv/bin/activatepip install pip setuptools wheel && pip install -r requirements.txt重要:使用OpenAI的访问令牌更新.ENV文件,并在OpenAI开发人员平台上具有积分https://platform.openai.com/。
python3 ./app.py注意:要使用其他消息测试应用程序,只需更改app.py文件中的代金券atendimento的文本即可。
Carraro,Fabricio。人工智能和CHATGPT:从生成AI模型的革命到促进工程。 1。Ed。 Sao Paulo:Casa Do Code Publisher,2023年。
Python DB API, DuckDB。可在以下网址找到:https://duckdb.org/docs/api/python/dbapi。访问:2024年4月22日。
什么是抹布?, aws。可在以下网址找到:https://aws.amazon.com/en/what-i/retieval-ugmented-generation/。访问:2024年4月22日。
单词嵌入:使计算机理解单词的含义 - 非常重要的NLP概念的介绍:嵌入和word2vec,媒介。可在以下网址获得:https://medium.com/turing-talks/word-empedding-fing-fo-fo-computer-nefing-da-da-das-lavras-92f2745057。访问:2024年4月22日。
langchain_community.vectors.duckdb.duckdb, api python langchain。可在以下网址获得:https://api.python.langchain.com/en/latest/vectors/langchain_community.vectors.duckdb.html。访问:2024年4月22日。
langchain_community.embeddings.openai.openaieembeddings, openieeemeembeddings。可在以下网址获得:https://api.python.langchain.com/en/latest/embeddings/langchain_community.embeddings.openai.openeeembedings.html#langchain-community-community-community-openai-openai-oppedings。访问:2024年4月22日。