Build AI – Enhanced Web Apps – Theo Despoudis

📥
Total Downloads: 6
 - Unknown book cover

Similarity determined by closeness in the embedding space Figure 5.8 The concept of embeddings using a restaurant menu analogy. The “embedding space” represents a multidimensional space where both customer orders (queries) and menu items are mapped as vectors. Each menu item (e.g., spaghetti carbonara) is a precomputed vector, while the customer order is converted to a query vector. Similarity between items is determined by their proximity in this space. Attributes like “pasta” or “creamy” represent dimensions of the embedding space. A similarity search finds the closest match and items similar to the query, mirroring how embedding-based systems in machine learning find relevant results for given inputs.

Here’s a breakdown of figure 5.8: ¡ Customer order as query vector—The “customer order” is represented as a query vec- tor in this space. This is analogous to how a user’s input or search query would be converted into a vector in an embedding-based system. ¡ Menu items as vectors—Each menu item (spaghetti carbonara, fettuccine alfredo, and penne arrabbiata) is also represented as a vector in the same space.

These would be precomputed embeddings of known items in the system. ¡ Similarity search—A similarity search is performed by comparing the customer order vector to the menu item vectors within the embedding space. This rep- resents how embedding-based systems find similar items or relevant responses. ¡ Closest match and similar items—The system can rank results based on their similar- ity to the query by comparing their distances.

¡ Attributes—Each menu item is connected to various attributes (“pasta,” “creamy,” “savory,” “spicy”). These attributes can be thought of as dimensions or features in the embedding space that contribute to the position of each item’s vector.

How to get reliable results with React, Next.js, and Vercel Using key technologies to create generative AI web applications User React (UI components) Next.js (frontend and backend) Vercel AI SDK (connects UI to AI providers) LangChain.js (LLM app framework, RAG, agents) LLMs and AI models (e.g., OpenAI, Google Gemini–Default) External AI providers Build AI-Enhanced Web Apps M A N N I N G Shelter Island Theo Despoudis Build AI-Enhanced Web Apps How to get reliable results with React, Next.js, and Vercel For online information and ordering of this and other Manning books, please visit www.manning.com.

The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: [email protected] © 2026 Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-­free paper, and we exert our best efforts to that end.

Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. ∞ Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 ISBN 9781633436084 Printed in the United States of America The author and publisher have made every effort to ensure that the information in this book was correct at press time. The author and publisher do not assume and hereby disclaim any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from negligence, accident, or any other cause, or from any usage of the information herein.

This is a short excerpt from the opening of “” by Unknown, quoted for review and introduction purposes. All rights belong to the copyright holders.

Book Information

  • Unique ID: 7f74c626ffcf28a2
  • File Extension: .pdf
  • File Size: 16,638,584 bytes (15.868 MB)
  • Title:
  • Author: Unknown
  • ISBN: 9781633436084
  • Pages: 395
  • Language: English (en)

Reading & Word Statistics

  • Estimated Reading Time: 602.99 minutes
  • Total Words: 120,598
  • Total Characters: 819,268
  • Average Words per Page: 305.31
  • Average Characters per Page: 2074.1

Most Frequent Words

model (622), api (599), user (523), application (497), data (485), use (426), using (425), server (415), web (392), prompt (391), text (388), key (387), const (368), langchain (347), response (341), next (339), vercel (339), example (324), input (323), code (322), function (314), sdk (312), state (284), applications (276), models (271), components (266), new (261), mcp (260), chapter (253), openai (252), tools (252), figure (240), message (239), like (236), responses (234), content (230), project (227), process (227), llm (219), document (215), client (215), chat (214), messages (212), building (205), google (199), context (193), system (191), error (191), need (191), react (190), component (188), create (183), documents (183), generative (181), testing (176), specific (172), listing (170), based (169), tool (167), page (167), information (163), users (161), embeddings (159), prompts (158), allows (156), streaming (155), rag (149), language (147), used (145), provides (145), following (145), gemini (143), provider (143), import (143), also (141), security (139), await (137), provide (136), output (135), chain (133), conversation (132), app (131), examples (131), vector (129), within (129), agent (128), integration (128), management (128), generation (128), generate (127), request (126), access (125), providers (124), different (124), return (124), run (122), summarization (121), structured (121), file (119), approach (118).

PDF Download

📖 Read Online (3D Flipbook)

You can start reading by flipping the pages.

Or download it as a PDF: