【训练营】llamaindex+Internlm2 RAG实践

RAG前

执行测试

conda activate llamaindex
cd ~/llamaindex_demo/
python llamaindex_internlm.py

错误:

/root/.conda/envs/llamaindex/lib/python3.10/site-packages/pydantic/_internal/_fields.py:161: UserWarning: Field "model_id" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████| 2/2 [00:03<00:00,  1.72s/it]
assistant: xtuner是一款用于播放音乐的软件,它支持多种音频格式,包括MP3、WAV、WMA、FLAC、AAC、APE、OGG、WMA、WAV、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、WMA、W

马龙是谁

马龙在伦敦奥运会上收获首个奥运冠军头衔,里约奥运会夺得奥运男单冠军军军军军军军

RAG具体实现

执行结果,可以正确引用知识库的内容做出解释
给出了参考文件README_zh-CN.md
在这里插入图片描述
马龙是谁

马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。
---------------------
Given the context information and prior knowledge, answer the query.
Query: 马龙是谁?
Answer: 马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。
---------------------
Given the context information and prior knowledge, answer the query.
Query: 马龙是谁?
Answer: 马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。
---------------------
Given the context information and prior knowledge, answer the query.
Query: 马龙是谁?
Answer: 马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。
---------------------
Given the context information and prior knowledge, answer the query.
Query: 马龙是谁?
Answer: 马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。
---------------------
Given the context information and prior knowledge, answer the query.
Query: 马龙是谁?
Answer: 马龙是中国男子乒乓球运动员,他是中国乒乓男队队长现任中国乒乓球协会运动员委员会主任。

web-demo

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值