Back to catalog / Agent workflows
Find repository functions with natural-language search
Parse Python functions, embed an index, and retrieve relevant implementations and paths from a natural-language query.
Goal
Parse Python functions, embed an index, and retrieve relevant implementations and paths from a natural-language query.
Steps
- Extract function text and paths, then create text-embedding-3-small vectors. [source-openai-find-code-functions-by-natural-language]
- Embed a query and return similar function snippets, paths, and nearby context. [source-openai-find-code-functions-by-natural-language]
- Test with known functions; use results for navigation, not as proof of correctness or safety. [source-openai-find-code-functions-by-natural-language]
How to verify
Use known queries to check retrieved function names and paths, then open the source to confirm the implementation rather than a same-named test.
Troubleshooting
If results are empty or stale, rebuild the index and check whether the parser skipped nested or async functions; show paths without editing code.
Permissions
Prerequisites
- Python, OpenAI embedding API, authorized read-only codebase; exclude secret files from the index.
Permissions
- Reads source code from the selected repository and may send function snippets to an embedding API; writes a local index and does not modify repository files.
Limitations
Run the source on isolated test data, then check outputs and dependency versions before adapting it.
Pinned upstream source
- Repository
- openai/openai-cookbook
- File path
- examples/Code_search_using_embeddings.ipynb
- Pinned commit
5bd6cb40b6b84b69b2032d810610aa85064102df- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification