{"id":28674385,"url":"https://github.com/versent/ai101-mvp-llm","last_synced_at":"2025-06-13T21:08:49.359Z","repository":{"id":293191167,"uuid":"974811396","full_name":"Versent/ai101-mvp-llm","owner":"Versent","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-14T05:08:42.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-14T06:35:27.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Versent.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,"zenodo":null}},"created_at":"2025-04-29T10:45:57.000Z","updated_at":"2025-05-14T06:25:02.000Z","dependencies_parsed_at":"2025-05-14T06:47:10.243Z","dependency_job_id":null,"html_url":"https://github.com/Versent/ai101-mvp-llm","commit_stats":null,"previous_names":["versent/ai101-mvp-llm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Versent/ai101-mvp-llm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Versent%2Fai101-mvp-llm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Versent%2Fai101-mvp-llm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Versent%2Fai101-mvp-llm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Versent%2Fai101-mvp-llm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Versent","download_url":"https://codeload.github.com/Versent/ai101-mvp-llm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Versent%2Fai101-mvp-llm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259719751,"owners_count":22901248,"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":"2025-06-13T21:08:45.348Z","updated_at":"2025-06-13T21:08:49.335Z","avatar_url":"https://github.com/Versent.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI 101 — Building an LLM-enabled app\n\nThe goal of this repo is to demonstrate how approachable it can be to include LLM's into your applications.\n\nThis is for app devs who might be familiar with NodeJS and Postgres, but unsure where to begin regarding LLM's.\n\nHere are some parts of the app that you should know:\n\n- My code: some NodeJS code to handle user input and output\n- SDK: the interface into the generative AI models, including tool use (this demo uses Vercel)\n- Provider: the thing which runs the model (this demo uses Ollama)\n- Model: the web of numbers that describe how artificial neurons should pass signals to each other to ultimately generate text\n- Vector Store: a database to store content and its corresponding vector (to search by similarity) (this demo uses Postgres)\n\nIt should be noted that SDK, Provider, Model, and Vector store are all interchangable, and new contenders are emerging weekly!\n\n```mermaid\ngraph LR\n    User \u003c--\u003e|UI| App\n    App \u003c--\u003e SDK\n    SDK \u003c--\u003e Ollama\n    Ollama \u003c--\u003e LLM\n    SDK \u003c--\u003e|via tool| Postgres\n```\n\n## Prerequisites\n\n- https://docs.docker.com/compose/install/\n- https://ollama.com/ (or you can use Docker)\n\n## Setup\n\nCreate the docker compose stack:\n\n```sh\nmake up\n```\n\nIf you want to run Ollama inside Docker (a perfectly good option, but often better value to install it).\nReview `./compose/ollama.yml` for available profiles — example:\n\n```sh\nPROFILE=cpu make up\nPROFILE=gpu-nvidia make up\n```\n\nInstall dependencies:\n\n```sh\nnpm i\n```\n\n## Run it\n\n```sh\nnpx tsx ./src/cli\n```\n\nOptionally specify a model to query:\n\n```sh\nnpx tsx ./src/cli -m qwen3:8b-q4_K_M\n```\n\n## Example use of tools\n\nTry some of the following prompts:\n\n\u003e think of a random number, then make a haiku about it and save it for later\n\n\u003e save what you know about the following topics: agile manifest, devops, and the bitcoin whitepaper, Attention is All You Need, LIGO, and the hubble space telescope\n\n\u003e what do you know about ligo?\n\n## Model suggestion\n\nUse any model which supports tools:\nhttps://ollama.com/search?c=tools\n\nExcellent tool usage from the following\n\n```\nqwen3:0.6b\nqwen3:1.7b\nqwen3:8b\nqwen3:14b\n```\n\n_Note:_ Usage of a new model requires pulling that new model to the `ollama-pull` service in the `compose/ollama.yml` file. e.g. `ollama pull qwen3:1.7b`.\n\n## Postgres\n\nYou can jump into postres with:\n\n```shell\ndocker compose exec -it pgvector psql -d embeddings -U admin\n```\n\nAnd review the content and emeddings with:\n\n```\nSELECT reference FROM content;\nSELECT chunk FROM embeddings;\n```\n\n## Evaluate\n\nWe can use LLM's to help us evaluate other LLM models.\n\n```sh\nnode --import tsx --enable-source-maps --test ./tests/**/*.test.ts\n```\n\nYou can see the results are interesting but not without error:\n\nSee sample runs: [tests/results/](./tests/results/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fversent%2Fai101-mvp-llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fversent%2Fai101-mvp-llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fversent%2Fai101-mvp-llm/lists"}