Enhancing Developer Experience with Generative AI: A Collaboration Between HERE Technologies and AWS
Introduction
In this post, we explore how HERE Technologies partnered with the AWS Generative AI Innovation Center to revolutionize the onboarding experience for developers using HERE’s Maps API for JavaScript, improving productivity through an AI-powered coding assistant.
Dataset
Resources Used in Solution Development
Solution Overview
Developing a Robust AI Coding Assistant
Solution Orchestration
Efficient Workflow Management Using Directed Acyclic Graphs (DAG)
Conclusion
Recurring insights into building the coding assistant and its impact on developer engagement and efficiency.
Enhancing Developer Productivity with HERE Technologies and AWS Generative AI
This blog post is co-written with Jonas Neuman from HERE Technologies.
In a world where mapping and location services are crucial, HERE Technologies is at the forefront with over 40 years of experience. Recently, they teamed up with the AWS Generative AI Innovation Center (GenAIIC) to design a groundbreaking generative AI-powered coding assistant. This innovative tool aims to streamline the onboarding experience for developers working with HERE’s self-service Maps API for JavaScript, promoting productivity and efficiency.
Addressing Developer Needs
New developers often face challenges when first exploring APIs. Common questions such as "How can I generate a walking route from point A to B?" or "How can I display a circle around a point?" highlight their need for quick and comprehensible answers. Although HERE provides comprehensive API documentation, they recognized that a more intuitive onboarding process could significantly improve developer engagement and retention rates. By addressing these initial hurdles, HERE aims to transform new developers into proficient advocates of their products.
Collaborating for Solutions
To address these challenges, HERE partnered with the GenAIIC. The mission was clear: develop an intelligent AI coding assistant that could seamlessly convert natural language queries into executable code snippets. The goal was to create a scalable system capable of generating HTML code embedded with JavaScript for instant visualization of maps.
Key Requirements
The development team set out to ensure the assistant would:
- Deliver accurate, renderable code in response to user queries.
- Provide quick interactions, maintaining context for follow-up questions (around 60 seconds latency).
- Uphold the integrity of HERE’s system with robust filtering for irrelevant queries.
- Maintain cost-effectiveness to achieve a positive ROI at scale.
Building on Amazon Bedrock
The collaboration birthed a solution leveraging Amazon Bedrock, a fully-managed service that offers access to foundation models (FMs) from leading AI companies via a single API. This service not only enables experimentation with various FMs but also supports built-in security and responsible AI features. Using this platform, HERE and GenAIIC could efficiently design a user-friendly coding assistant, enhancing the developer experience significantly.
The Dataset
To lay the groundwork for this solution, several resources were utilized:
- Domain Documentation: Two primary resources were the HERE Maps API for JavaScript Developer Guide and API Reference.
- Sample Cases: HERE furnished 60 representative scenarios, encapsulating user queries, code solutions, and concise descriptions, which were categorized into training and testing sets.
- Out-of-Scope Queries: Samples of inquiries beyond the scope of the API were utilized to refine the assistant’s focus.
Solution Architecture
To ensure the coding assistant efficiently responded to user inquiries, a Retrieval-Augmented Generation (RAG) workflow was devised. This allowed real-time access to accurate and updated documentation, circumventing the limitations of traditional large language models (LLMs).
Key Modules
The solution architecture comprises several essential modules:
-
Follow-Up Question Module: This module manages contextual conversations, storing chat histories for dynamic interaction.
-
Scope Filtering Module: Safeguards against irrelevant or harmful queries using Amazon Bedrock’s Guardrails and Anthropic’s Claude 3 Haiku model, ensuring responsible AI use.
-
Knowledge Base Module: Utilizes Amazon Bedrock Knowledge Bases for effective document retrieval and indexing without the complexity of custom integrations.
- Response Generation Module: Processes feasible queries, combining user input with relevant document snippets to generate accurate HTML and JavaScript code.
Orchestrating the Workflow
By employing a Directed Acyclic Graph (DAG) using LangGraph, the functionality of each module was meticulously organized. This design enables parallel task execution and ensures the integrity and efficiency of the assistant’s responses.
The user experience begins when a question is submitted, triggering a workflow that encompasses:
- Reformulating the Question.
- Applying Safeguards to Filter Inappropriate Questions.
- Retrieving Relevant Documents.
- Generating a Response if Feasible.
This streamlined approach ensures a rapid response while maintaining context and relevance.
Conclusion
The partnership between HERE Technologies and AWS GenAIIC has given rise to a powerful generative AI coding assistant, transforming how developers engage with the HERE Maps API for JavaScript. This solution not only enhances the developer experience but also opens new paths for efficient API exploration and implementation.
By harnessing the capabilities of generative AI, HERE is paving the way for a future where developers can effortlessly create interactive maps and location-based services, shaping the way we navigate our world.
For example, consider the following code snippet generated by the AI assistant for the query: “How to open an infobubble when clicking on a marker?”
// Add a click event listener to the marker
marker.addEventListener('tap', function(evt) {
// Create an info bubble object
var bubble = new H.ui.InfoBubble(evt.target.getGeometry(), {
content: bubbleContent
});
// Add info bubble to the UI
ui.addBubble(bubble);
});
/**
* Boilerplate map initialization code starts below:
*/
// Step 1: initialize communication with the platform
var platform = new H.service.Platform({
apikey: ‘Your_API_Key'
});
var defaultLayers = platform.createDefaultLayers();
// Step 2: initialize a map
var map = new H.Map(document.getElementById('map'), defaultLayers.vector.normal.map, {
center: {lat:28.6071, lng:77.2127},
zoom: 13,
pixelRatio: window.devicePixelRatio || 1
});
window.addEventListener('resize', () => map.getViewPort().resize());
// Step 3: make the map interactive
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
// Step 4: Create the default UI components
var ui = H.ui.UI.createDefault(map, defaultLayers);
// Step 5: main logic
addMarkerWithInfoBubble(map, ui);
Together, HERE Technologies and AWS are redefining the landscape of developer productivity, using AI to make mapping and navigation not just accessible but incredibly intuitive.