Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microsoft/RecAI
Bridging LLM and Recommender System.
https://github.com/microsoft/RecAI
llm recommender
Last synced: 3 months ago
JSON representation
Bridging LLM and Recommender System.
- Host: GitHub
- URL: https://github.com/microsoft/RecAI
- Owner: microsoft
- License: mit
- Created: 2023-09-07T08:21:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-04T13:32:39.000Z (3 months ago)
- Last Synced: 2024-08-04T15:27:31.443Z (3 months ago)
- Topics: llm, recommender
- Language: Jupyter Notebook
- Homepage:
- Size: 16.6 MB
- Stars: 476
- Watchers: 11
- Forks: 40
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
- StarryDivineSky - microsoft/RecAI - emb 发挥作用的地方。RecLM-emb 与文本嵌入模型(如 text-embedding-ada-002)保持一致,但它专门针对项目检索进行了优化。目标是嵌入用于项目检索的所有内容。目前仅支持文本模式,例如搜索查询、项目描述和用户说明。`生成式 RecLM`:需要注意的是,不同域的数据模式差异很大,这意味着通用LLM型可能无法在特定域内提供优化的性能。为了适应特定的领域数据模式,为领域项目目录奠定基础,并增强指令跟踪能力,本项目讨论了为推荐者微调生成语言模型的过程,称为 RecLM-gen。技术包括监督微调 (SFT) 和强化学习 (RL)。这种方法的潜在应用包括排名器、对话推荐器和用户模拟器。`模型解释器`:基于深度学习的推荐系统因其在有效性和效率方面的优势而广泛应用于各种在线服务中。然而,这些模型通常缺乏可解释性,使它们对用户和开发人员来说都不太可靠和透明。在这项工作中,我们提出了一种新的推荐系统模型解释方法,称为 RecExplainer,通过用作LLMs代理模型并学习模仿和理解目标推荐模型。`RecLM 评估器`:评估对于评估模型的真实能力和确定需要进一步改进的薄弱环节至关重要。在以类似人类的方式使用语言模型作为推荐器的时代,评估方法已经明显偏离了传统风格。该项目旨在为基于LM的推荐系统的评估提供全面的服务。无论是提供经过训练的 LM 还是 API(例如 Azure OpenAI API),它都会从各个角度评估模型的性能,包括检索、排名、解释功能和常规 AI 能力。 (其他_推荐系统 / 网络服务_其他)
README
# RecAI: Leveraging Large Language Models for Next-Generation Recommender Systems
Large Language Models (LLMs) offer significant potential for the development of cutting-edge recommender systems, particularly in terms of enhancing interactivity, explainability, and controllability. These are aspects that have traditionally posed challenges. However, the direct application of a general-purpose LLM for recommendation purposes is not viable due to the absence of specific domain knowledge.
The RecAI project aims to bridge this gap by investigating various strategies to integrate LLMs into recommender systems, a concept people usually term as LLM4Rec. Our goal is to reflect the real-world needs of LLM4Rec through holistic views and methodologies.
We believe that by adopting a holistic perspective, we can incorporate the majority of practical requirements of LLM4Rec into one or more of the techniques explored in the RecAI project. These techniques include, but are not limited to, Recommender AI agents, the injection of knowledge through personalized prompting, fine-tuning language models as recommenders, evaluation, and LLMs as model explainers. The ultimate objective is to create a more sophisticated, interactive, and user-centric recommender system.
Recommender AI Agent
LLMs provide natural interactions and respond smartly to human instructions but lack domain-specific expertise. In contrast, traditional recommender systems excel with in-domain data training yet are constrained to structured data and lack interactivity. InteRecAgent introduces an AI agent that combines the strengths of both: it employs an LLM as the brain and traditional recommender models as tools. Consequently, traditional models like matrix factorization can be transformed into conversational, interactive, and explainable recommender systems..
Selective Knowledge Plugin
How can we enhance an LLM's domain-specific ability without finetuning the model? Then the prompt is the key. In this work, we introduce a method that augments LLMs with selective knowledge, so that large-scale, continuously evolving, and domain-specific data patterns can be injected by prompt.
Embedding RecLM
Dense retrieval is a crucial component in a range of scenarios, including recommender systems and retrieval-augmented generation (RAG). While generative language models such as GPTs are designed for sequential token generation, they are not optimized for retrieval-oriented embedding. This is where our project, RecLM-emb, comes into play. RecLM-emb aligns with text-embedding models like text-embedding-ada-002, but it is specifically optimized for item retrieval. The goal is to embed everything for item retrieval. Currently it only supports text modality, such as search query, item description, and user instructions.
Generative RecLM
It's important to note that data patterns vary significantly across domains, meaning a general-purpose LLM may not deliver optimized performance within a specific domain. To adapt to specific domain data patterns, grounding to domain item catalogs, and enhance instruction-following capability, this project discusses the process of fine-tuning a generative Language Model for recommenders, referred to as RecLM-gen. Techniques include supervised finetuning (SFT) and reinforcement learning (RL). Potential applications of this approach include rankers, conversational recommenders, and user simulators.
Model Explainer
Deep learning-based recommender systems are widely used in various online services, thanks to their superiority in effectiveness and efficiency. However, these models often lack interpretability, making them less reliable and transparent for both users and developers. In this work, we propose a new model interpretation approach for recommender systems, call RecExplainer, by using LLMs as surrogate models and learn to mimic and comprehend target recommender models.
RecLM Evaluator
Evaluation is crucial for assessing the true capabilities of models and identifying areas of weakness for further improvement. In the era of using language models as recommenders, which function in a human-like manner, the evaluation method has significantly deviated from traditional styles. This project intends to offer a comprehensive service for the evaluation of LM-based recommender systems. Whether provided with a trained LM or an API (such as Azure OpenAI API), it assesses the model's performance from various perspectives, including retrieval, ranking, explanation capability, and general AI ability.
## License
RecAI uses [MIT](./LICENSE) license.## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.## Acknowledge
Thanks to the open source codes of the following projects:
[UniRec](https://github.com/microsoft/UniRec)
[VisualChatGPT](https://github.com/microsoft/TaskMatrix/blob/main/visual_chatgpt.py)
[JARVIS](https://github.com/microsoft/JARVIS)
[LangChain](https://github.com/langchain-ai/langchain)
[guidance](https://github.com/microsoft/guidance)
[FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)## Responsible AI FAQ
Please refer to [RecAI: Responsible AI FAQ](./RAI_FAQ.md) for document on the purposes, capabilities, and limitations of the RecAI systems.
## Citation
If this project aids your research, please cite our following paper and any related paper in the respective subfolder.```
@article{lian2024recai,
title={RecAI: Leveraging Large Language Models for Next-Generation Recommender Systems},
author={Lian, Jianxun and Lei, Yuxuan and Huang, Xu and Yao, Jing and Xu, Wei and Xie, Xing},
journal={arXiv preprint arXiv:2403.06465},
year={2024}
}
```