Vectors: Difference between revisions

From Freephile Wiki
No edit summary
expand comment on the MariaDB vector support
Line 8: Line 8:
[[wp:Vector_database|Vector databases]] like [[wp:Neo4j|Neo4j]] have been important for quite some time now. They are ever more important now that [[Artificial Intelligence]] is mainstream. A vector database is a collection of data stored as mathematical representations. Vector databases make it possible for computer programs to draw comparisons, identify relationships, and understand context. They enable '''Semantic Search''' which is search based on meaning rather than exact text matching. While semantic searching has been around for decades, tagging and ontologies have morphed into LLMs. Vector databases enable the creation of advanced artificial intelligence (AI) programs like large language models (LLMs).  
[[wp:Vector_database|Vector databases]] like [[wp:Neo4j|Neo4j]] have been important for quite some time now. They are ever more important now that [[Artificial Intelligence]] is mainstream. A vector database is a collection of data stored as mathematical representations. Vector databases make it possible for computer programs to draw comparisons, identify relationships, and understand context. They enable '''Semantic Search''' which is search based on meaning rather than exact text matching. While semantic searching has been around for decades, tagging and ontologies have morphed into LLMs. Vector databases enable the creation of advanced artificial intelligence (AI) programs like large language models (LLMs).  


There are many open source vector databases<ref>[[wp:Vector_database#Implementations]]</ref> such as Apache Cassandra, [[Elasticsearch]], Meilisearch and MongoDB. (Even traditional Relational Databases [[MariaDB]]<ref>https://mariadb.org/amazon-mariadb-vector/</ref> and [[Postgres]]<ref>https://github.com/pgvector/pgvector</ref> offer vector capability now.)   
There are many open source vector databases<ref>[[wp:Vector_database#Implementations]]</ref> such as Apache Cassandra, [[Elasticsearch]], Meilisearch and MongoDB. (Even traditional Relational Databases [[MariaDB]]<ref>It was '''Hugo Wen''' of the Amazon RDS team who contributed heavily to this feature of MariaDB.
 
Why add vectors to a relational database? There are already databases designed specifically for vectors, but they will lead to additional layers in a database architecture and increase overall costs for the service. Supporting vectors inside the relational database will reduce complexity and simplify maintenance, thus making it more cost efficient. With MariaDB Server, users can have data and vectors in two tables of the same database and access them both with one single query.
 
Postgres offers similar (free) open source capabilities. MySQL's implementation is reserved for their enterprise version customers.
 
https://mariadb.org/amazon-mariadb-vector/</ref> and [[Postgres]]<ref>https://github.com/pgvector/pgvector</ref> offer vector capability now.)   


One interesting open source vector database is '''Memgraph'''. Memgraph is like Neo4j without the cost. Memgraph uses the same Cypher query language as Neo4j. However, it is written in C++ and integrates better with Python than Neo4j, which uses Java to build applications. An interesting case study is how NASA is building a People Knowledge Graph with LLMs and Memgraph<ref>https://www.theregister.com/2025/05/07/nasa_people_memgraph/</ref>. In the NASA case study, they use [[Ollama]] which is a locally deployed AI model runner which can be thought of as like [[Docker Desktop]] for running [[Docker]] images.
One interesting open source vector database is '''Memgraph'''. Memgraph is like Neo4j without the cost. Memgraph uses the same Cypher query language as Neo4j. However, it is written in C++ and integrates better with Python than Neo4j, which uses Java to build applications. An interesting case study is how NASA is building a People Knowledge Graph with LLMs and Memgraph<ref>https://www.theregister.com/2025/05/07/nasa_people_memgraph/</ref>. In the NASA case study, they use [[Ollama]] which is a locally deployed AI model runner which can be thought of as like [[Docker Desktop]] for running [[Docker]] images.

Revision as of 11:55, 10 May 2025

Disambiguation: The term wp:Vector has many different definitions depending on the context.

In biology, a vector is an organism, often an insect or animal, that transmits a disease-causing agent (pathogen) from one host to another. A vector, as related to molecular biology, is a DNA molecule (often plasmid or virus) that is used as a vehicle to carry a particular DNA segment into a host cell as part of a cloning or recombinant DNA technique. The vector typically assists in replicating and/or expressing the inserted DNA sequence inside the host cell.[1] So, while understanding vectors in biology is important for disease prevention, understanding vectors in domains such as math or computing are altogether different.

Computing

In computing, a vector is a one-dimensional array data structure. The Nordic Language Processing Laboratory, Language Technology Group at the University of Oslo, Norway publishes their research tools which help visualize how word vectors work in LLMs For instance, here's the vector for cat showing word relationships using English Wikipedia as the training corpus. (Click the link that says "Show the raw vector" to see the full numerical word vector).

Vector databases like Neo4j have been important for quite some time now. They are ever more important now that Artificial Intelligence is mainstream. A vector database is a collection of data stored as mathematical representations. Vector databases make it possible for computer programs to draw comparisons, identify relationships, and understand context. They enable Semantic Search which is search based on meaning rather than exact text matching. While semantic searching has been around for decades, tagging and ontologies have morphed into LLMs. Vector databases enable the creation of advanced artificial intelligence (AI) programs like large language models (LLMs).

There are many open source vector databases[2] such as Apache Cassandra, Elasticsearch, Meilisearch and MongoDB. (Even traditional Relational Databases MariaDB[3] and Postgres[4] offer vector capability now.)

One interesting open source vector database is Memgraph. Memgraph is like Neo4j without the cost. Memgraph uses the same Cypher query language as Neo4j. However, it is written in C++ and integrates better with Python than Neo4j, which uses Java to build applications. An interesting case study is how NASA is building a People Knowledge Graph with LLMs and Memgraph[5]. In the NASA case study, they use Ollama which is a locally deployed AI model runner which can be thought of as like Docker Desktop for running Docker images.



References

  1. https://www.genome.gov/genetics-glossary/Vector
  2. wp:Vector database
  3. It was Hugo Wen of the Amazon RDS team who contributed heavily to this feature of MariaDB. Why add vectors to a relational database? There are already databases designed specifically for vectors, but they will lead to additional layers in a database architecture and increase overall costs for the service. Supporting vectors inside the relational database will reduce complexity and simplify maintenance, thus making it more cost efficient. With MariaDB Server, users can have data and vectors in two tables of the same database and access them both with one single query. Postgres offers similar (free) open source capabilities. MySQL's implementation is reserved for their enterprise version customers. https://mariadb.org/amazon-mariadb-vector/
  4. https://github.com/pgvector/pgvector
  5. https://www.theregister.com/2025/05/07/nasa_people_memgraph/