{"id":18602068,"url":"https://github.com/build-on-aws/rag-golang-postgresql-langchain","last_synced_at":"2025-05-06T15:29:02.622Z","repository":{"id":233084276,"uuid":"785952655","full_name":"build-on-aws/rag-golang-postgresql-langchain","owner":"build-on-aws","description":"Implement RAG (using LangChain and PostgreSQL) for Go applications to improve the accuracy and relevance of LLM outputs","archived":false,"fork":false,"pushed_at":"2024-04-19T13:06:50.000Z","size":194,"stargazers_count":33,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T01:31:39.933Z","etag":null,"topics":["amazon-bedrock","generative-ai","golang","langchain","large-language-models","pgvector","postgresql"],"latest_commit_sha":null,"homepage":"https://community.aws/content/2f1mRXuakNO22izRKDVNRazzxhb","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/build-on-aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-13T01:59:02.000Z","updated_at":"2025-03-19T18:15:20.000Z","dependencies_parsed_at":"2024-11-07T02:10:19.657Z","dependency_job_id":"599b2122-a9ff-40e3-b39b-fb69a8a98e8b","html_url":"https://github.com/build-on-aws/rag-golang-postgresql-langchain","commit_stats":null,"previous_names":["build-on-aws/rag-golang-postgresql-langchain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Frag-golang-postgresql-langchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Frag-golang-postgresql-langchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Frag-golang-postgresql-langchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Frag-golang-postgresql-langchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/build-on-aws","download_url":"https://codeload.github.com/build-on-aws/rag-golang-postgresql-langchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252712628,"owners_count":21792347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-bedrock","generative-ai","golang","langchain","large-language-models","pgvector","postgresql"],"created_at":"2024-11-07T02:10:13.177Z","updated_at":"2025-05-06T15:29:02.602Z","avatar_url":"https://github.com/build-on-aws.png","language":"Go","funding_links":[],"categories":["💻 项目实战"],"sub_categories":["💾 Redis"],"readme":"# How to use Retrieval Augmented Generation (RAG) for Go applications\n\n\u003e Implement RAG (using LangChain and PostgreSQL) to improve the accuracy and relevance of LLM outputs\n\nThis repository contains source code corresponding to the blog post [How to use Retrieval Augmented Generation (RAG) for Go applications](https://community.aws/content/2f1mRXuakNO22izRKDVNRazzxhb) which covers how to leverage the [Go programming language](https://go.dev/) to use Vector Databases and techniques such as Retrieval Augmented Generation (RAG) with [langchaingo](https://github.com/tmc/langchaingo). \n\n![](arch.png)\n\nLarge Language Models (LLMs) and other foundation models have been trained on a large corpus of data enabling them to perform well at many natural language processing (NLP) tasks. But one of the most important limitations is that most foundation models and LLMs use a static dataset which often has a specific knowledge cut-off (say, January 2023). \n\nRAG (Retrieval Augmented Generation) enhances LLMs by dynamically retrieving external information during the response generation process, thereby expanding the model's knowledge base beyond its original training data. RAG-based solutions incorporate a vector store which can be indexed and queried to retrieve the most recent and relevant information, thereby extending the LLM's knowledge beyond its training cut-off. When an LLM equipped with RAG needs to generate a response, it first queries a vector store to find relevant, up-to-date information related to the query. This process ensures that the model's outputs are not just based on its pre-existing knowledge but are augmented with the latest information, thereby improving the accuracy and relevance of its responses.\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis library is licensed under the MIT-0 License. See the LICENSE file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuild-on-aws%2Frag-golang-postgresql-langchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuild-on-aws%2Frag-golang-postgresql-langchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuild-on-aws%2Frag-golang-postgresql-langchain/lists"}