Understanding vector search

Semantic search and embeddings: finding an idea in your manuscript

Find a scene, a forgotten clue or a detail without remembering the exact words. Discover how semantic search and local AI can help you explore your novel.

You remember a scene in which your character begins to distrust their best friend. You can picture the mood of the conversation, and you know the passage exists, but you cannot find it.

You try several words in your writing software's search box. “Distrust”, “doubt”, “betrayal”… Nothing. Yet the scene is somewhere in your manuscript.

What if you could simply describe what you remember to find the right passage?

That is the purpose of semantic search. Instead of looking only for the words you type, it tries to find passages that match the meaning of your request.

This opens up new possibilities for writers, especially when a novel contains dozens of chapters, many characters and interwoven plots.

Find an idea rather than a word

Traditional search remains an essential writing tool. It quickly finds a name, an expression or a specific sentence. But it reaches its limits when you no longer remember the words you used.

Imagine you are looking for the moment when Anna realises Paul has lied to her. In your manuscript, the revelation may emerge during a conversation without the words “lie” or “deception” ever appearing.

A keyword search might miss this scene. A semantic search, however, can connect your question to passages involving a loss of trust, a contradiction or a revelation.

The same principle applies when you want to find a forgotten description, a promise made several chapters earlier or an event whose exact location you cannot remember.

The difference matters. You no longer necessarily need to remember what you wrote, but what you wanted to convey.

How embeddings work

To find passages by meaning, many semantic search systems use a technology called embeddings.

Behind this rather technical term is a fairly simple principle.

An AI model converts a passage of text into a numerical representation made up of a series of numbers. This representation is called a vector.

You can think of these vectors as coordinates on a vast map of meanings. Two passages dealing with similar ideas may end up in neighbouring areas, even if they use different vocabulary.

Consider these two sentences.

“She had not trusted him since that night.”

“Their friendship had fallen apart after the secret came out.”

The words are different, but both sentences evoke a breakdown of trust. A suitable embedding model could place their numerical representations close together.

The principle also works in the other direction. When an author asks a question, it can be converted into a vector and compared with the representations of passages in the manuscript.

The system then looks for excerpts closest in meaning to the request.

This similarity remains a mathematical estimate. It does not mean the AI understands a story as a human reader would. It is a way of finding potentially useful passages.

For this kind of search, the text is generally divided into passages short enough to be analysed and retrieved individually.

In a novel, these divisions can follow scenes, paragraphs or blocks of text. A particularly long scene might be split into several excerpts to avoid combining too much information.

Each passage is then associated with its numerical representation and information that allows it to be located in the manuscript.

When a question is asked, the system compares its meaning with that of the indexed passages. The excerpts judged most relevant can then be presented to the author.

This makes it possible to search a long manuscript without analysing its entire contents with a text-generation model every time.

However, the index needs to evolve with the book. When a scene is changed, moved or deleted, the search index must account for these changes so it does not rely on outdated passages.

When semantic search meets artificial intelligence

Finding a passage is already valuable. But you can go further by combining semantic search with an AI model capable of formulating an answer.

This approach is called RAG, short for Retrieval-Augmented Generation.

The principle is to first find relevant passages within a collection of documents, then provide them to the AI model so it can answer using that information.

For a writer, it is like having an assistant consult the passages likely to contain the answer before responding.

Suppose you ask when Anna discovers that her brother is alive. Instead of trying to answer from an approximate recollection of your story, the system can retrieve the relevant scenes and use their contents.

This helps ground answers in the manuscript. It reduces some risks of fabrication without eliminating them entirely.

Being able to inspect the source passages remains essential. An answer can sound convincing while overlooking a detail, confusing two events or misinterpreting a situation.

Ask your manuscript with LumenScribe

LumenScribe makes this approach accessible to authors through “Ask your manuscript”, available with Premium.

You can ask questions about your story in natural language without knowing the exact words or the chapter containing the information.

A few examples show how useful this can be.

  • “Who did Anna give the key to before she left?”
  • “Does the fire happen before or after Paul's disappearance?”
  • “How did I describe Paul's scar?”
  • “Which scenes mention a fear of water?”
  • “When does Anna begin to distrust Malik?”

LumenScribe searches for relevant passages in your manuscript, then uses the retrieved excerpts to build its answer.

You can open these passages directly to check the information and put it back in context.

This matters. The assistant does more than give you an isolated answer. It lets you return to the original text you actually wrote.

Your manuscript and questions are processed locally on your computer, without being sent to a remote AI API for these operations.

This independence does involve a trade-off. AI performance depends directly on your computer's capabilities. Available memory determines the size of the models you can use, while a compatible graphics card can speed them up. The most capable models generally require more resources.

LumenScribe therefore offers several models for different hardware configurations. Lighter models can already provide useful answers, especially for finding information or checking a specific detail. However, they have limitations when following a conversation and referring back to previous questions. With these models, it is currently better to phrase each question independently, including the context needed to understand it.

This is a trade-off to bear in mind. Local AI does not necessarily have the power of large models hosted on remote servers, but it offers greater control over your data and the freedom to ask questions about your manuscript without sending it to an external service. For authors who place particular value on the privacy of their writing, this benefit can readily justify some technical limitations.

A useful aid to keeping your novel consistent

At the beginning of a writing project, it is usually easy to remember the events and details of your story. As the chapters add up, however, some information becomes harder to find.

A character has moved home. An important object has been entrusted to someone. A scar was described months earlier. A revelation changes the way two characters behave towards each other.

These details may seem minor when you write them, but they contribute to the consistency of the whole story.

Semantic search can then become a useful revision tool.

In crime fiction, it can help you revisit clues or revelations. In fantasy, it can make it easier to find details about a place, an object or an ancient history. In contemporary fiction, it can help trace a relationship's development or find passages associated with a particular emotion.

Its value extends beyond quickly finding a forgotten sentence. It can also make it easier to explore a story that has grown richer as you have written it.

Traditional search remains essential

Semantic search does not replace keyword search. The two methods serve different needs.

If you want to find every occurrence of “Anna”, check the spelling of a place name or locate an exact quotation, traditional search is generally the most reliable approach.

Semantic search is particularly useful when you are looking for an idea, a situation or a detail whose wording you have forgotten.

It also has limitations. A model may misinterpret a metaphor, miss irony or confuse characters in similar situations.

Proper names, nicknames and complex relationships between characters can also make searching harder.

Finding information is also different from checking all its implications. Answering a question about chronology, for instance, may require comparing several passages.

Finally, a lack of results does not prove that a detail is absent from the manuscript. The passage you need may simply not have been correctly identified.

Semantic search should therefore be treated as an aid to exploration, rather than a tool that can guarantee a novel's complete consistency on its own.

Search that respects your manuscript's privacy

When an author asks an AI a question, they may reveal important information about an unpublished work.

Questions can disclose plots, character secrets, key events or details the author wishes to keep private.

Semantic search and embedding models can run directly on a computer. From a technical standpoint, there is therefore no need to send a manuscript to an external server to perform this kind of search.

This is the approach LumenScribe takes with its local AI assistance. Questions and passages used to query your manuscript are processed on your machine.

Remember, too, that a search index remains data derived from the manuscript, even when it consists of numerical representations. It deserves suitable protection, just like the original files.

Finally, local processing never replaces backups. Regularly keeping copies of your work remains essential to protect against data loss. LumenScribe offers automated backups to help safeguard your writing projects.

A new way to explore your story

Writing a novel is not just about moving from one chapter to the next. It also involves revisiting what you have already told, recovering an earlier intention, checking a detail or rediscovering a forgotten passage.

Semantic search offers another way to do this work. By connecting passages according to meaning, it lets you explore a manuscript beyond searching for individual words.

Combined with local AI, it can become a useful way to ask questions about your story.

With “Ask your manuscript”, LumenScribe brings this possibility to authors. You can recover forgotten details, read the relevant passages and continue writing while staying in control of your text.

AI is not intended to replace your memory as an author, your judgement or your imagination. It can simply help you find what you have already created more easily.

Explore LumenScribe and its local AI

Frequently asked questions

Traditional search finds the words or phrases you enter. Semantic search looks for passages whose meaning is close to your request, even when different words are used.

What is an embedding?

An embedding is a numerical representation of text produced by an AI model. Among other uses, it allows passages to be compared by semantic similarity. It should not be treated as an anonymous or entirely harmless version of the original text.

What is the difference between embeddings and RAG?

Embeddings can help find passages related to a question. RAG combines document retrieval with a generation model that uses the retrieved passages to formulate an answer.

Embeddings are one possible method for carrying out that search, but they are not the only one.

Can you ask an AI questions about an entire novel?

Yes, a retrieval system can let you query information within a long manuscript. That does not mean the model necessarily reads the whole book for every question.

With a RAG approach, passages judged relevant are retrieved and then used to build the answer. Quality depends on the search, the selected excerpts and the model's capabilities.

Does LumenScribe send my manuscript over the Internet to answer questions?

No. “Ask your manuscript” processes your manuscript locally on your computer, without sending your text or questions to a remote AI API.