{"id":15408368,"url":"https://github.com/yusukebe/my-first-rag","last_synced_at":"2025-06-28T20:05:39.219Z","repository":{"id":250681631,"uuid":"830511190","full_name":"yusukebe/my-first-rag","owner":"yusukebe","description":"My first RAG application","archived":false,"fork":false,"pushed_at":"2024-07-29T09:37:54.000Z","size":5,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:51:15.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusukebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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-07-18T12:19:53.000Z","updated_at":"2025-02-21T02:08:19.000Z","dependencies_parsed_at":"2024-07-29T12:31:16.770Z","dependency_job_id":"7f44435f-cd27-4d7d-b96a-afbac5c9deaf","html_url":"https://github.com/yusukebe/my-first-rag","commit_stats":null,"previous_names":["yusukebe/my-first-rag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fmy-first-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fmy-first-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fmy-first-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2Fmy-first-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusukebe","download_url":"https://codeload.github.com/yusukebe/my-first-rag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249604104,"owners_count":21298421,"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":[],"created_at":"2024-10-01T16:33:39.816Z","updated_at":"2025-04-19T04:15:10.601Z","avatar_url":"https://github.com/yusukebe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My first RAG\n\nThis is my first RAG (Retrieval Augmented Generative) application. It uses Cloudflare Workers and Cloudflare's Workers AI.\n\nThis application is based on the [example](https://github.com/kristianfreeman/cloudflare-retrieval-augmented-generation-example) used in [Cloudflare's tutorial](https://developers.cloudflare.com/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/).\n\n## Stack\n\nThe technology stack used includes:\n\n- Cloudflare Workers\n- Workers AI\n- Vectorize\n- D1\n\nAdditionally, SSE (Server-Sent Events) is used for rendering results, allowing text to be displayed in a stream.\n\n## Demo\n\nUsing technical documents as the content for RAG yielded good results.\n\n![DEMO](https://github.com/user-attachments/assets/8b36bfef-2009-4f59-8eb0-e1801cf3dec3)\n\n## Usage\n\n### Installation\n\n```sh\nclone git@github.com:yusukebe/my-first-rag.git\ncd my-first-rag\nnpm i\n```\n\n### Create the D1 database\n\n```sh\nnpm run wrangler --remote d1 create database-my-first-rag\n```\n\n### Create the Vectorize database\n\n```sh\nnpm run wrangler vectorize create vector-index-my-first-rag --dimensions=768 --metric=cosine\n```\n\n### Edit `wrangler.toml`\n\n```toml\n[[vectorize]]\nbinding = \"VECTORIZE_INDEX\"\nindex_name = \"vector-index-my-first-rag\"\n\n[[d1_databases]]\nbinding = \"DB\"\ndatabase_name = \"database-my-first-rag\"\ndatabase_id = \"xxxxxxxx\" # \u003c== edit!\n```\n\n### Start the application\n\n```sh\nnpm run dev\n```\n\n## Author\n\nYusuke Wada\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fmy-first-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusukebe%2Fmy-first-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fmy-first-rag/lists"}