Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2024 - Gally @ SyliusCon - Crafting an Open Sou...

Romain Ruaud
November 19, 2024
8

2024 - Gally @ SyliusCon - Crafting an Open Source Product Discovery Solution

Romain Ruaud

November 19, 2024
Tweet

Transcript

  1. Before we begin, kudos to Stephan ! Stephan should have

    been there today as a speaker but unfortunately was not able to attend. Stephan and his bitExpert team supported Gally since the beginning and they wrote the official Sylius connector for Gally, so I just wanted to give Stephan a big THANK YOU !
  2. TABLE OF CONTENTS Intro, History & Inception Going into Technical

    Using it in real uses cases From a Magento extension to a Full Part product • Where we stand, what we’ve done in the past • Exposing our needs and the architecture we’ve built to fulfill them Main concepts of Gally • Elasticsearch index, mappings & fields abstraction • GraphQl stitching • Vector search For Composable Commerce, Headful or Headless implementations • Using Gally with Headless/Headful Sylius • Using it from vendor tablets • Using it from a Chatbot / LLM Agent
  3. Our mission We all want the same thing: to find

    that special something But we can all use a little help. That’s where we come in ! We’re matchmakers. We see e-commerce as an opportunity to bring people together with the right products at the right time. We have 10 years of experience under our belt and we are not afraid to use it !
  4. Personalization PRODUCT DISCOVERY : Not (only) a search engine Categories

    Search Merchandising Facets / Filters Recommended On sale Preorders Search … Fulltext search configuration IA / LLM powered search Synonyms & Expansions Virtual categories Manual ranking products Facet management Category level facet management Ranking algorithm Boosting rules How to furnish your house Cross-content Multi-Languages Extensibility Plugins SDK API-First
  5. Where we stand and what’s to come 2013 - 2015

    2016 - 2019 2019 - 2020 2021 - 2023 2024 - 2026 R&D project • 1 people • Some Smile customers as early adopters Productization • Product has a name : Elasticsuite • Distributed as Open Source (for free) • Strong growth worldwide Questioning • Adobe/Magento stepped into the discussion to acquire us Startupisation • Dedicated team / Business Unit inside Smile Group • Develop a new product to address other E-Commerce solutions : Gally Scale • Reach new E-Commerce markets with Gally • Accelerate on worldwide sales
  6. Our main goals FOR MERCHANTS A fast and easy to

    use back-office Business features helping them to increase their revenue Affordable Customizable FOR END USERS Relevant search results Natural language ready Excellent response time FOR DEVELOPERS Easy to extend Not requiring extensive knowledge of low-level search engines Modern technologies and paradigms
  7. The way merchants interact with their customers is unique and

    their business performance is tight to their capability on creating an unique merchandising that is different from their concurrents. We wanted to create an Open Source tool that can be adapted exactly to the experience asked by final customers in terms of features and personalisation. That’s what people like on ElasticSuite. It’s our DNA. We didn’t want to be an (other) rigid and blackboxed SaaS solution We wanted to build Gally on a popular framework, making it easy to understand and customize for a huge number of developers : no homemade-framework to learn, no over-engineering. Keeping our Open Source philosophy
  8. The first level to address was the lowest one :

    - the search engine itself We’ve been having 10+ years of experience on Elasticsearch, and were also familiar with OpenSearch. This was a no-brainer for us, we decided to stick with them and to support both. Building our Open Source architecture : Search Elasticsearch AWS OpenSearch - on Premise - or Cloud - or Serverless - AI/ML features (but on paid licence) - on Premise - or Cloud - or Serverless - AI/ML features
  9. Second level to address is the middle one : -

    the business logic - the APIs We needed a layer : - where we could easily implement our concepts and keep them extensible for agencies. - that could be easily exposed as APIs, both for configuration (write) and for browsing (read). Building our Open Source architecture : API API Platform Symfony - API-first (as the name says) - built on top of Symfony - very easy to expose REST / GraphQl - and they’re french. Just like us. - well-known by most EU agencies - robust and extensible - did I mention they’re french ?
  10. Final level to address is the top one : -

    User Interface We needed a layer : - where we could easily implement our concepts and keep them extensible for agencies. (yes, again) - modern, easy to scaffold for building a fancy Back-Office Building our Open Source architecture : Frontend Next React - Legacy component of API Platform Admin - only used for routing in Gally - well-known by most developers - easy to interact with GraphQl API - a lot of UX/UI libraries (MaterialUI)
  11. The final stack : inside a Gally application Web Server

    & Cache Nginx & Varnish Business features & Elasticsearch API wrapper Gally PHP bundles (Symfony) GraphQl & REST API builder API Platform (Symfony) Configuration storage PostgreSQL Content & Data storage, computation, search Opensearch (or Elasticsearch) Open source and extensible
  12. TABLE OF CONTENTS Intro, History & Inception Going into Technical

    Using it in real uses cases From a Magento extension to a Full Part product • Where we stand, what we’ve done in the past • Exposing our needs and the architecture we’ve built to fulfill them Main concepts of Gally • Elasticsearch index, mappings & fields abstraction • GraphQl stitching • Vector search For Composable Commerce, Headful or Headless implementations • Using Gally with Headless/Headful Sylius • Using it from vendor tablets • Using it from a Chatbot / LLM Agent
  13. Elasticsearch is soooo complicated ! Cluster Nodes Shards (& replicas)

    Indices (& aliases) Mapping Settings Fields Analyzers Tokenizers Filters Type Properties Analyzer To setup a great Searchandising experience, you need to masterize a lot of imbricated concepts so that search results will be really relevant for all languages, typo tolerant, able to deal with plurals, etc…
  14. Elasticsearch is soooo complicated ! - “I want to index

    my products names and brands so that the name can be used for searching and the brand can be used for filtering. It would be nice if the order of the words could be taken into account and also typo tolerant“ - “Sure, hold my beer” NB : the “shingle”, “standard”, “whitespace”, “spelling” configuration depicted here also needs to be crafted (and it’s per language !!)
  15. That’s where Gally comes in CATALOG LOCALE ENTITY FIELD A

    Business scope. Eg for Pepsi.Co : - Pepsi - 7up - Gatorade A Business object. Eg : - Products - Categories - Blog posts A Business object typed property. Eg : - Name (string) - Price (float) - Stock Status (bool) Localized Business scope. Eg : - FR - EN - ES First layer of abstraction over the Elasticsearch concept. Just easy-to-understand notions. No need to bother with complex configurations. No deep understanding of Elasticsearch needed, we have built-in configuration for analyzers, tokenizers, typo tolerant search…. Push your structure and you’re (nearly) done !
  16. Create fields via API, Gally creates the mapping REST API

    Gally Business Logic ELASTICSEARCH PUT “Catalog” { "code": "pespi", }, PUT “Locale” { “code”: “en_US”, “catalog: “pepsi” } PUT “Entity” { “code”: “product”, } PUT “Field” { "code": "name", "label": "Product Name", "type": "string", "entity": "product" }, Persist catalog/locale in DB Persist entities in DB Persist fields configuration in DB Generate the Elasticsearch mapping according to each : - field type - catalog locale Create the needed indices
  17. Control your configuration The configuration is then exposed in the

    Gally Back-Office and can be edited per-entity & per-field. Each edit triggers a call to the API and a refresh of the Elasticsearch settings in real-time.
  18. Pushing your data, for all your entities Indexing the documents

    is just about sending a bulk of them, json encoded. The Gally API will take care of putting them into the proper Elasticsearch index. The previously generated settings/mappings will ensure their data is correctly indexed. REST API POST “Documents” { "catalog": "pespi", “locale”: “fr_FR”, “entity” : “product” “documents” : “[{“id”:1, “name”: “Pepsi cola 1L”, “brand”: “Pepsico”, ……………]” },
  19. TABLE OF CONTENTS Intro, History & Inception Going into Technical

    Using it in real uses cases From a Magento extension to a Full Part product • Where we stand, what we’ve done in the past • Exposing our needs and the architecture we’ve built to fulfill them Main concepts of Gally • Elasticsearch index, mappings & fields abstraction • GraphQl stitching, querying your content • Vector search For Composable Commerce, Headful or Headless implementations • Using Gally with Headless/Headful Sylius • Using it from vendor tablets • Using it from a Chatbot / LLM Agent
  20. Querying content with structured GraphQl API REST API is great

    for writing and storing field configurations. But the Gally read API is supposed to be called by websites frontend apps. We’ve chosen GraphQl because : • Flexible Queries: Clients fetch only the data they need : reduced payload • Performance: One query fetches all data : cut down on network requests. • Fast Iteration: Frontend changes require minimal backend updates. • Developer Experience: Clear schema and type validation. • Tooling: Automatic introspection and documentation.
  21. Querying content with structured GraphQl API So far so good,

    GraphQl is the way to go ! But, wait, …. how can we generate a structured GraphQl schema knowing that our underlying structure might be permanently moving ??? The structure will depend on : - the data itself : which fields are existing - the configuration made by the users : which fields are used for display/filtering Well, we’ll have to “stitch” our own schema.
  22. Hands on to the stitching Schema is dynamically (re) generated

    according to the data & the configuration.
  23. Why the stitching was important Adaptability to Data Changes: The

    schema adjusts as the underlying data structure evolves, meaning less manual work to keep the API in sync with data updates. Reduced Maintenance Effort: Automatic schema generation cuts down on manual schema updates, reducing potential errors and developer workload. Faster Development Cycles: Developers can move quickly, as schema changes automatically reflect data changes, reducing back-and-forth between frontend and backend. Improved Consistency: Ensures that the schema always accurately mirrors the data structure, enhancing reliability and consistency across the API.
  24. TABLE OF CONTENTS Intro, History & Inception Going into Technical

    Using it in real uses cases From a Magento extension to a Full Part product • Where we stand, what we’ve done in the past • Exposing our needs and the architecture we’ve built to fulfill them Main concepts of Gally • Elasticsearch index, mappings & fields abstraction • GraphQl stitching, querying your content • Vector search For Composable Commerce, Headful or Headless implementations • Using Gally with Headless/Headful Sylius • Using it from vendor tablets • Using it from a Chatbot / LLM Agent
  25. Implementing vector search : why ? Relevance Drives Sales: Relevant

    search results improve the chances of conversion by connecting customers with products that match their needs. User Experience as a Priority: In a fast-paced market, users expect instant, precise results that reduce search time and make shopping more enjoyable. Competitive Advantage: An advanced search engine can differentiate platforms by meeting high user expectations for relevance and personalization. Our Goal: Committed to top-tier search functionality, we wanted to deliver a smooth & precise search experience. In order to stream from our service you will need a high quality connection. The required bandwidth speed for using the service will vary depending on How fast should my connection be ?
  26. Implementing vector search : main concepts Benefits Powerful complement for

    standard textual search. Can detect intentions or deal with natural language out-of-the-box. Has the capability to reveal relevant products that may be overlooked in traditional searches due to distant connections between search terms and product descriptions. { data : { name : “Chardonnay 2005”, description : “.... good with fish …” } } Keyword search engine Vector search engine v No results found. wine for seafood wine for seafood … Chardonnay 2005
  27. Implementing vector search : indexing Principle • An AI language

    model (LLM) is called to represent the semantics of a text in a set of vectors (embeddings) • This LLM, during the indexing phase, is used to calculate vectors corresponding to each product. • This is made possible by Elasticsearch/Opensearch but once again, this is a multiple-steps implementation that Gally is encapsulating. • Pre-trained, Local or External models can be used. Word embeddings Sparkling white wine -71 34 … -24 87 … … 26 64
  28. Implementing vector search : query time Principle • On query

    time, the same LLM will transform the keywords typed by the end user to vectors as well. • Then a kNN (k-nearest neighbors) search will be done by Gally to fetch the products that are the “closest” (mathematically) of the user query. Principle • On query time, the same LLM will transform the keywords typed by the end user to vectors as well. • Then a kNN (k-nearest neighbors) search will be done by Gally to fetch the products that are the “closest” (mathematically) of the user query. Documents Queries transform into embeddings transform into embeddings -71 28 34 34 Nearest Neighbor Results Chardonnay 2005 wine for seafood …
  29. TABLE OF CONTENTS Intro, History & Inception Going into Technical

    Using it in real uses cases From a Magento extension to a Full Part product • Where we stand, what we’ve done in the past • Exposing our needs and the architecture we’ve built to fulfill them Main concepts of Gally • Elasticsearch index, mappings & fields abstraction • GraphQl stitching, querying your content • Vector search For Composable Commerce, Headful or Headless implementations • Using Gally with Headless/Headful Sylius • Using it from vendor tablets • Using it from a Chatbot / LLM Agent
  30. How it works : headless or not Vendor tablet in

    physical shop End User Your cloud ecosystem A chatbot agent GraphQL API GraphQL API Frontend connector Backend + Index omnichannel data and leverage on cloud based features
  31. How to implement with a chatbot agent End User Chat

    Agent Summarize user needs according to the dicussion and generate the GraphQl query. LLM Fetch the proper products Explain his needs : “which dowels should I use for hanging a mirror in my bathroom ?”
  32. Romain RUAUD Co founder & CTO [email protected] Any questions ?

    Daniel GUIZADO Channel Manager [email protected] Book a demo on our booth or on https:/ /meetgally.com#demo