{"data":{"slug":"flagopen-flagembedding","name":"FlagEmbedding","tagline":"Retrieval and Retrieval-augmented LLMs","github_url":"https://github.com/FlagOpen/FlagEmbedding","owner":"FlagOpen","repo":"FlagEmbedding","owner_avatar_url":"https://avatars.githubusercontent.com/u/114467038?v=4","primary_language":"Python","stars":12070,"forks":907,"topics":["embeddings","information-retrieval","llm","retrieval-augmented-generation","sentence-embeddings","text-semantic-similarity"],"archived":false,"github_pushed_at":"2026-08-14T06:19:17+00:00","maintenance_label":"Active","stars_delta_30d":102,"url":"https://www.graphcanon.com/tools/flagopen-flagembedding","markdown_url":"https://www.graphcanon.com/tools/flagopen-flagembedding.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/flagopen-flagembedding","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=flagopen-flagembedding","description":"Retrieval and Retrieval-augmented LLMs","homepage_url":"http://www.bge-model.com/","license":"MIT","open_issues":910,"watchers":59,"ai_summary":"The FlagEmbedding repository focuses on developing tools for embeddings, information retrieval, and retrieval-augmented generative models.","readme_excerpt":"### Install from sources:\n\nClone the repository and install\n```\ngit clone https://github.com/FlagOpen/FlagEmbedding.git\ncd FlagEmbedding\n\n---\n\n# If you do not need to finetune the models, you can install the package without the finetune dependency:\npip install  .\n\n---\n\n# If you want to finetune the models, install the package with the finetune dependency:\n\n---\n\n# pip install  .[finetune]\n```\nFor development in editable mode:\n```\n\n---\n\n# If you do not need to finetune the models, you can install the package without the finetune dependency:\npip install -e .\n\n---\n\n## Quick Start\nFirst, load one of the BGE embedding model:\n```\nfrom FlagEmbedding import FlagAutoModel\n\nmodel = FlagAutoModel.from_finetuned('BAAI/bge-base-en-v1.5',\n                                      query_instruction_for_retrieval=\"Represent this sentence for searching relevant passages:\",\n                                      use_fp16=True)\n```\nThen, feed some sentences to the model and get their embeddings:\n```\nsentences_1 = [\"I love NLP\", \"I love machine learning\"]\nsentences_2 = [\"I love BGE\", \"I love text retrieval\"]\nembeddings_1 = model.encode(sentences_1)\nembeddings_2 = model.encode(sentences_2)\n```\nOnce we get the embeddings, we can compute similarity by inner product:\n```\nsimilarity = embeddings_1 @ embeddings_2.T\nprint(similarity)\n```\n\nFor more details, you can refer to [embedder inference](./examples/inference/embedder), [reranker inference](./examples/inference/reranker), [embedder finetune](./examples/finetune/embedder), [reranker fintune](./examples/finetune/reranker), [evaluation](./examples/evaluation).\n\nIf you're unfamiliar with any of related concepts, please check out the [tutorial](./Tutorials/). If it's not there, let us know.\n\nFor more interesting topics related to BGE, take a look at [research](./research).\n\n---\n\n## License\nFlagEmbedding is licensed under the [MIT License](https://github.com/FlagOpen/FlagEmbedding/blob/master/LICENSE). \n\n<p align=\"center\">\n  <sub>This work is supported by the National Science and Technology Major Project (No. 2022ZD0116300).</sub>\n</p>","github_created_at":"2023-08-02T02:08:11+00:00","created_at":"2026-07-11T11:28:22.709663+00:00","updated_at":"2026-08-22T00:01:25.506933+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"embeddings","name":"embeddings"},{"slug":"information-retrieval","name":"information-retrieval"},{"slug":"llm","name":"llm"},{"slug":"retrieval-augmented-generation","name":"retrieval-augmented-generation"},{"slug":"sentence-embeddings","name":"sentence-embeddings"},{"slug":"text-semantic-similarity","name":"text-semantic-similarity"}],"trust":{"provenance":{"is_fork":false,"github_id":673596675,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-22T00:01:24.747Z","maintenance":{"label":"Active","score":82,"methodology":"github_public_v1","releases_90d":0,"days_since_push":7,"last_release_at":"2026-04-22T15:59:10Z","stars_delta_30d":102,"open_issues_delta_30d":2},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:28:23.828Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-22T00:01:25.204Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-08-22T00:01:25.204Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-22T00:01:25.204Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["If you need to integrate semantic search capabilities within your application, particularly where sentence-level embeddings are critical for finding semantically similar text.","When working with large corpora of text data needing fine-grained similarity scores between sentences or phrases for advanced retrieval tasks."],"when_not_to_use":["Avoid using FlagEmbedding if you require real-time or extremely low-latency text matching, as the process may involve significant computational overhead and latency.","Do not adopt this tool if your application is already heavily invested in a different ecosystem where integration costs would outweigh benefits, unless specific retrieval-augmented capabilities are a亟","# 由于中文回答被打断了，我将继续剩余的部分。为了避免重复，这里直接给出完整的答案格式。# 继续剩余部分的完整答案在下一条消息中发布。由于篇幅限制，需要分两段发送完成。UrlParserFixtureHeaderCodeGeneratoruser乌鲁木 큐","# 之前的回答被打断了，我继续在这里提供FlagEmbedding的知识图谱提取信息。根据要求格式化后的结果如下："],"source":"enrich:decision_facts","observed_at":"2026-07-11T15:35:03.651Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"FlagEmbedding is a Python-based tool focused on developing components for embedding generation and enhancing retrieval systems for use in retrieval-augmented language models."}]}}