{"id":20530456,"url":"https://github.com/tahmidefaz/seedling","last_synced_at":"2026-05-27T13:33:03.377Z","repository":{"id":250642537,"uuid":"834633908","full_name":"tahmidefaz/seedling","owner":"tahmidefaz","description":"🌱 Simple and scalable intent recognition using LLMs","archived":false,"fork":false,"pushed_at":"2024-07-30T02:42:29.000Z","size":255,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-08T20:50:28.750Z","etag":null,"topics":["generative-ai","intent-detection","python-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tahmidefaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-27T21:54:09.000Z","updated_at":"2024-09-30T15:50:31.000Z","dependencies_parsed_at":"2024-07-30T07:05:54.715Z","dependency_job_id":null,"html_url":"https://github.com/tahmidefaz/seedling","commit_stats":null,"previous_names":["tahmidefaz/seedling"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tahmidefaz/seedling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahmidefaz%2Fseedling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahmidefaz%2Fseedling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahmidefaz%2Fseedling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahmidefaz%2Fseedling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tahmidefaz","download_url":"https://codeload.github.com/tahmidefaz/seedling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahmidefaz%2Fseedling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33568857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["generative-ai","intent-detection","python-library"],"created_at":"2024-11-15T23:38:32.315Z","updated_at":"2026-05-27T13:33:03.335Z","avatar_url":"https://github.com/tahmidefaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌱 seedling\n\n*A simple and supposedly scalable python library for intent recognition using Large Language Models (LLMs).*\n\n\n## The Idea\n\nSeedling 🌱 gives you a very simple and scalable way to detect intents from user messages using LLMs.\nIn order to make things scalable, seedling forces you to group your intents to **topics**.\nThis also keeps your prompt length short, reduces LLM hallucination, and makes LLM output more accurate.\n\n![An image showing intents grouped together into topics](/topics_and_intents.png)\n*Example image showing intents grouped under six different topics*\n\nSeedling supports OpenAI/OpenAI-Complatible APIs out of the box.\nThe OpenAI-Compatible API server must support `tools` use.\nIt is also very easy to write your own LLM interface for prediction purposes.\n\n\n### Defining Topic YAML\n\nFollowing is a simple topic YAML file for the `map` topic with the related intents grouped under it.\nPlease note that both the topic and the intent `description` must be as detailed as possible, as these get fed into the LLM.\n\n```yaml\nname: \"map\"\ndescription: \"Get directions, find places such as restaurants, shops, places of interest, etc.\"\n\nintents:\n  - name: \"get_directions\"\n    description: \"Gets directions between two locations.\"\n  - name: \"find_place\"\n    description: \"Finds a specific place like a restaurant, gas station, or store.\"\n  - name: \"get_traffic_information\"\n    description: \"Gets real-time traffic information for a route.\"\n```\n\nEach YAML files must NOT contain more than 1 topic.\n\n\n### One-shot entity extraction\n\nIn addition to detecting intents, seedling also allows you to attempt to extract entities in one-shot.\nFor enitity extraction, the smarter your LLM is, the better.\n\n```yaml\nname: \"travel\"\ndescription: \"Plan and manage travel arrangements. Search for hotels, flights, and rental cars.\"\n\nintents:\n  - name: \"search_flights\"\n    description: \"Searches for flights based on origin, destination, and dates.\"\n    entities:\n      - name: \"origin\"\n        type: \"string\"\n        description: \"The origin of the flight. Write 'none' if not provided.\"\n      - name: \"destination\"\n        type: \"string\"\n        description: \"The destination of the flight.  Write 'none' if not provided.\"\n      - name: \"date\"\n        type: \"string\"\n        description: \"The date of the flight. Write 'none' if not provided.\"\n```\n\n\n## Basic Usage\n\n```python\nfrom seedling import YAMLreader, LanguageModel, predict\n\n# Path to the directory containing all your topic/intent YAML files\nall_topics = YAMLreader(\"directory_path\")\n\n# OpenAI/OpenAI-compatible LLM server (must support tools use)\n# check example/main.py for Ollama config\nllm = LanguageModel(\n    base_url='http://baseurl',\n    api_key='apikey',\n    model='model_name',\n)\n\n# Predict the intent of the user message\nuser_message = \"do some magic on spotify!\"\npredicted = predict(llm, all_topics, user_message)\n\nprint(predicted)\n```\n\n\n## Check out the example\n\nThe example is great for wrapping your head around everything.\nFollow these steps to run the example:\n\n1. Start a virtual environment\n    ```\n    python -m venv venv\n    source venv/bin/activate\n    ```\n2. Build the seedling 🌱 library\n    ```\n    pip install -e .\n    ```\n3. Install the latest version of [Ollama](https://ollama.com/) and pull down the `llama3.1` model.\n   Alternatively, you can also update the example file under `example/main.py` with your OpenAI/OpenAI-compatible API server information.\n   ```\n   ollama pull llama3.1\n   ```\n5. Run the example\n    ```\n    cd example\n    python main.py\n    ```\n\n\n## Local Development\n\n* Only tested on `python 3.11` so far\n* Currently, the actual library source code can be found under `src/seedling`\n* To install all dependencies do `pip install .\"[dev]\"` in your virtual environment\n* Use `make lint` to run the linter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahmidefaz%2Fseedling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahmidefaz%2Fseedling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahmidefaz%2Fseedling/lists"}