# Entity resolution with Elasticsearch, part 3: Optimizing LLM integration with function calling

DevFeed: [Entity resolution with Elasticsearch, part 3: Optimizing LLM integration with function calling](<https://devfeed.tech/articles/entity-resolution-with-elasticsearch-part-3-optimizing-llm-integration-with-function-calling-78782.md>)

Original publisher: [Read original article](<https://www.elastic.co/search-labs/blog/elasticsearch-entity-resolution-llm-function-calling>)

Author: Jessica Moszkowicz

Published: 2026-03-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Elasticsearch Labs](<https://devfeed.tech/sources/elasticsearch-labs.md>)

Topics: [Entity resolution](<https://devfeed.tech/topics/entity-resolution.md>), [function calling](<https://devfeed.tech/topics/function-calling.md>), [elasticsearch](<https://devfeed.tech/topics/elasticsearch.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [cost](<https://devfeed.tech/tags/cost.md>), [elasticsearch](<https://devfeed.tech/tags/elasticsearch.md>), [entity-resolution](<https://devfeed.tech/tags/entity-resolution.md>), [function-calling](<https://devfeed.tech/tags/function-calling.md>), [has](<https://devfeed.tech/tags/has.md>), [hybrid-search](<https://devfeed.tech/tags/hybrid-search.md>), [llm](<https://devfeed.tech/tags/llm.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>)

## AI overview

This tutorial describes an entity resolution pipeline using Elasticsearch and an LLM to match entities. It replaces prompt-generated JSON with function calling and minimal schemas to eliminate JSON parsing errors, improve recall, and reduce retry-related token costs. The results are from an educational prototype, and the article notes that production systems need additional monitoring, alerting, fallback, and error-handling measures.

## Source excerpt

Learn how function calling enhances LLM integration, enabling a reliable and cost-efficient entity resolution pipeline in Elasticsearch.