Developer experience changes rapidly. Many developers and the Cisco DevNet community utilize Generative AI tools and language models for code generation and troubleshooting.
Better data – better model completion
The main challenge for GenAI users is finding valid data for their prompts or Vector Databases. Developers and engineers need to care about the data they plan to use for LLMs/GenAI interaction.
OpenAPI documentations is now available to download
The OpenAPI documentation is a specification that defines a standard way to describe RESTful APIs, including endpoints, parameters, request/response formats, and authentication methods, promoting interoperability and ease of integration.
We at Cisco DevNet care about developers’ experience and want to make your experience working with Cisco APIs efficient and with minimal development/testing costs.
You can find links to OpenAPI documentation in JSON/YAML format here: Open API Documentation page and Search related product API – Navigate to API Reference -> Overview section in left-side menu
Note: Some API documentation can contain multiple OpenAPI Documents
For which purpose you can use related OpenAPI documentation as a part of prompt/RAG:
- Construct code or script that utilizes related Cisco API
- Find related API operations or ask to fix existing code using the information in the API documentation
- Create integrations with Cisco products through API
- Create and test AI agents
- Utilize related Cisco OpenAPI documentation locally or using approved AI tools in your organization.
Structured vs Unstructured data
I’ve compared two LLM model completions with a prompt that contains two parts.
The first part of the prompt was the same and contained the following information:
Based on the following API documentation, please write step-by-step instructions that can help automatically tag roaming computers using Umbrella API.
High-level workflow description:
- Add API Key
- Generate OAuth 2.0 access token
- Create tag
- Get the list of roaming computers and identify related ‘originId’
- Add tag to devices.
API documentation:
Second part:
- In one case, it contains copy and paste data directly from the doc,
- The other one contains LLM-friendly structured data like OpenAPI documents pasted one by one
Part of CDO OpenAPI documentation
Claude 3 Sonnet model completion. Prompt with OpenAPI documents
Claude 3 Sonnet model completion. Prompt with copy and paste data
Benefits of using LLM-friendly documentation as a part of the prompt
I’ve found that model output was more accurate when we used OpenAPI documents as a part of a prompt. API endpoints provided in each step were more accurate. Recommendations in sections like “Get List of Roaming Computers” contain better and more optimal instructions and API operations.
I’ve tested this with other foundational models, and model completion was more accurate when I used the OpenAPI document as a part of the prompt.
Some links on the Cisco APIs OpenAPI Documents
Share: