Papers
Topics
Authors
Recent
2000 character limit reached

Conversational Geometry: Interactive Figure Retrieval

Updated 19 November 2025
  • Conversational Geometry is an approach integrating a controlled query language, ontological graphs, and dependency lattices to support interactive geometric figure retrieval.
  • The method transforms procedural geometric descriptions into structured ontological graphs by parsing constructions and modeling dependencies.
  • It employs a dependency lattice for iterative query relaxation, enabling robust, context-aware matching and ranking of geometric figures.

Conversational Geometry is an approach to the interactive retrieval and reasoning over geometric figures, centered on the integration of a tightly controlled procedural query language, robust declarative ontological representations, and dependency-lattice–guided query relaxation algorithms. The methodology facilitates user-system dialogue for querying large geometric repositories, where queries are incrementally refined and interpreted both procedurally and declaratively, enabling flexible, context-aware figure search and retrieval (Haralambous et al., 2014).

1. Controlled Query Language for Geometric Figures

A core component of Conversational Geometry is the Controlled Query Language (CQL), a deterministic controlled natural language designed for expressing procedural descriptions of geometric constructions. The CQL grammar, specified in extended Backus–Naur Form (BNF), includes constructs for singular/plural forms, lists, optional articles, and conjunctions. The grammar supports procedural sentences such as:

1
D, E, F are midpoints of A-C, A-B, B-C; C-E intersects B-D at G; draw A-C, A-F, A-B, B-C, B-D, C-E.

Lexical classes are specified using regular expressions, with categories including instance types (point, segment, line, angle, circle), verbs (is, are, intersect[s]?), adjectives (perpendicular, parallel, defined, right), nouns (midpoint, foot, mediatrix, intersection, bisector), prepositions (at, of, by, to, on), and variable labels. This deterministic, small-scope grammar allows efficient parsing into stepwise construction sequences, suitable for both user-generated queries and interface automation (Haralambous et al., 2014).

2. Ontological Graph Representation

Procedural and CQL-derived descriptions are transformed into ontological graphs, which serve as the declarative backbone for geometric figure representation. In this framework, nodes correspond to instances of geometric concepts (point, segment, line, conic, angle), and edges are typed relations capturing geometric dependencies and attributes.

Primary relation types include:

  • belongs_to(x,y)\mathsf{belongs\_to}(x, y): membership (e.g., point on segment)
  • has_ratio(s1,s2,r)\mathsf{has\_ratio}(s_1, s_2, r): proportion between figures (length or angle ratio)
  • is_center_of(P,C)\mathsf{is\_center\_of}(P, C): centership (point is center of circle)
  • is_radius_of(s,C)\mathsf{is\_radius\_of}(s, C): radius relationship
  • is_parallel_to(l1,l2)\mathsf{is\_parallel\_to}(l_1, l_2) and is_perpendicular_to(o1,o2)\mathsf{is\_perpendicular\_to}(o_1, o_2): metric relations

The construction algorithm instantiates nodes and edges from the procedural description or DGS XML, applies inference closure for transitive relations (parallelism, perpendicularity), and completes implicit geometries (e.g., angle nodes for intersecting segments). In the referenced corpus, this process yields 5,282 concept nodes and 10,211 relation edges over 134 figures (Haralambous et al., 2014).

3. Dependency Lattice and Query Reduction

To support procedural reasoning and progressive query relaxation, each query or figure construction sequence is compiled into a dependency lattice. The lattice is a directed acyclic graph D=(O{S,T},E)D = (\mathcal{O} \cup \{S, T\}, E), where O\mathcal{O} is the set of geometric objects, SS is a global source node for primitive inputs, and TT is the sink node for final output objects.

Edges are annotated with operation codes: 'm' (midpoint), 'i' (intersection), 's' (segment-draw). The partial order on objects is by reachability in DD; lattice meet \bigwedge (greatest lower bound) and join \bigvee (least upper bound) correspond respectively to lowest common ancestor and greatest common ancestor in the procedural dependency tree.

Construction steps:

  1. Parse all construction operations.
  2. For each operation, add arcs from input(s) to output(s).
  3. Add source SS to inputs without predecessors; add sink TT from outputs not consumed in further operations.

This structure enables systematic reduction: removing lowest (closest-to-sink) nodes or edges in the lattice corresponds to relaxing the most recent constraints, facilitating robust query degradation and incremental matching (Haralambous et al., 2014).

4. Interactive Query Processing Pipeline

The full conversational geometry pipeline is implemented as an interactive, multi-stage algorithm:

  1. Query Acquisition: Input via CQL or DGS XML and parse into construction sequence.
  2. Graph Construction: Build the ontological graph GqG_q for the query.
  3. Lattice Generation: Construct the dependency lattice DqD_q.
  4. Database Matching: Match GqG_q against the corpus using graph DBMS (Neo4j, Cypher queries).
  5. Iterative Relaxation: If no match, iteratively remove lowest nodes/edges in DqD_q and retry matching.
  6. Ranking: Return top-kk matches ranked by Gq/Gmatch|G_q|/|G_{match}| (size ratio of query to matched figure).

This cycle underpins the conversational interface: as users add or clarify steps procedurally or visually, the matching pipeline is re-invoked, providing immediate feedback and guiding clarification requests. No explicit complexity bounds are given for the matching stage; practical subgraph queries rely on Neo4j’s Cypher engine performance (Haralambous et al., 2014).

5. Case Studies and Dialogue Dynamics

Detailed case studies demonstrate the interplay between procedural queries, ontological graphs, and dependency lattices. For instance, a query describing a triangle’s medians and centroid, when reduced by removing the centroid constraint, successfully degrades to a broader class of triangle figures with medians. This incremental, lattice-guided reduction allows for:

  • Partial queries: The system proactively seeks matches or suggests relaxations (“Would you like me to drop the requirement that GG lie on AFAF?”).
  • Clarification loops: When reduction fails, the agent poses clarifying questions (“I see you want a right triangle with a perpendicular. Do you also insist that the foot lies on segment ABAB?”).
  • Follow-up extensions: Definitions and queries can be layered or generalized, such as constructing all squares on the sides of a referenced triangle, maintaining referential context within layered ontological graphs.

A sample CQL and graph construction for the centroid theorem is as follows:

Query:

1
D, E, F are midpoints of A-C, A-B, B-C; C-E intersects B-D at G; draw A-C, A-F, A-B, B-C, B-D, C-E.
Ontological graph: 7 point nodes, segment nodes, and corresponding "belongs_to" and "has_ratio" (1:1) edges. Dependency lattice: Nodes and edges encode the midpoint, intersection, and draw operations, supporting fine-grained query reduction (Haralambous et al., 2014).

6. System Implementation and Corpus Statistics

  • CQL compiler: Python implementation using the PLY (lex/yacc) toolkit.
  • Graph storage: Ontological graphs stored in Neo4j, accessed via auto-generated Cypher queries.
  • DGS integration: Supports GeoGebra XML format; CQL is compiled to GeoGebra XML and then to ontological graphs.
  • Corpus size: 134 figures, 5,282 nodes, 10,211 edges.

Initial response times are sub-500 ms for exact-match queries, with iterative reduction and ranking requiring 1–2 seconds on commodity hardware. The current inference step only captures basic geometric closures (parallelism, orthogonality, equality); planned extensions include a full deductive database using Chou’s fix-point method for deeper fact recovery, and the addition of approximate subgraph search plugins to support real-time dialogue needs (Haralambous et al., 2014).

7. Scope, Limitations, and Extension Opportunities

Conversational Geometry leverages a deterministic procedural language, declarative ontological representations, and dependency-based relaxation to enable interactive geometric figure search. Limitations include:

  • Inference depth: Closure is limited to parallelism/orthogonality and equality by construction; deductive extensions are under consideration.
  • Performance dependency: Subgraph matching relies on underlying graph database optimizations.
  • Approximate matching: Real-time dialogue may require incremental caching and support for non-exact match heuristics.

Extensibility is inherent, as both the controlled language and ontology can be expanded (e.g., user-defined macros for geometric subsets), ensuring adaptability to diverse geometry workflows and future automated theorem proving integrations (Haralambous et al., 2014).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)
Slide Deck Streamline Icon: https://streamlinehq.com

Whiteboard

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Conversational Geometry.